package androidx.compose.runtime;

import V4.C;
import V4.E;
import androidx.compose.runtime.internal.StabilityInferred;

/* JADX INFO: loaded from: classes.dex */
@StabilityInferred(parameters = 0)
public final class CompositionScopedCoroutineScopeCanceller implements RememberObserver {
    public static final int $stable = 8;
    private final C coroutineScope;

    public CompositionScopedCoroutineScopeCanceller(C c6) {
        this.coroutineScope = c6;
    }

    public final C getCoroutineScope() {
        return this.coroutineScope;
    }

    @Override // androidx.compose.runtime.RememberObserver
    public void onAbandoned() {
        C c6 = this.coroutineScope;
        if (c6 instanceof RememberedCoroutineScope) {
            ((RememberedCoroutineScope) c6).cancelIfCreated();
        } else {
            E.i(c6, new LeftCompositionCancellationException());
        }
    }

    @Override // androidx.compose.runtime.RememberObserver
    public void onForgotten() {
        C c6 = this.coroutineScope;
        if (c6 instanceof RememberedCoroutineScope) {
            ((RememberedCoroutineScope) c6).cancelIfCreated();
        } else {
            E.i(c6, new LeftCompositionCancellationException());
        }
    }

    @Override // androidx.compose.runtime.RememberObserver
    public void onRemembered() {
    }
}
