package M2;

import V2.C0677j;
import V2.C0716s;
import V2.u3;
import android.content.Context;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.MutableState;
import h3.AbstractC2121h0;
import h3.AbstractC2127i0;
import h3.C2112f3;
import h3.G3;
import h3.T3;
import w4.C3137A;

/* JADX INFO: renamed from: M2.k1, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0524k1 implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f4804a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Context f4805b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ MutableState f4806c;

    public /* synthetic */ C0524k1(Context context, MutableState mutableState, int i6) {
        this.f4804a = i6;
        this.f4805b = context;
        this.f4806c = mutableState;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        switch (this.f4804a) {
            case 0:
                Composer composer = (Composer) obj;
                int iIntValue = ((Number) obj2).intValue();
                if ((iIntValue & 3) == 2 && composer.getSkipping()) {
                    composer.skipToGroupEnd();
                } else {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(1792079477, iIntValue, -1, "com.debridstream.mobile.MobileSettings.<anonymous>.<anonymous> (MobileSettings.kt:283)");
                    }
                    composer.startReplaceGroup(282171298);
                    final Context context = this.f4805b;
                    boolean zChangedInstance = composer.changedInstance(context);
                    Object objRememberedValue = composer.rememberedValue();
                    if (zChangedInstance || objRememberedValue == Composer.Companion.getEmpty()) {
                        final MutableState mutableState = this.f4806c;
                        final int i6 = 0;
                        objRememberedValue = new J4.a() { // from class: M2.j1
                            @Override // J4.a
                            public final Object invoke() {
                                switch (i6) {
                                    case 0:
                                        MutableState mutableState2 = mutableState;
                                        J.f fVar = B1.f4224a;
                                        mutableState2.setValue(Boolean.FALSE);
                                        u3.e(new C0556x0(3));
                                        C0716s c0716s = C0716s.f8049a;
                                        C0716s.i(context, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                    case 1:
                                        Context context2 = context;
                                        MutableState mutableState3 = mutableState;
                                        float f6 = G3.f16846a;
                                        mutableState3.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(19));
                                        C0716s c0716s2 = C0716s.f8049a;
                                        kotlin.jvm.internal.o.h(context2, "context");
                                        Context applicationContext = context2.getApplicationContext();
                                        V4.B0 b02 = C0716s.f8051c;
                                        if (b02 != null) {
                                            b02.cancel(null);
                                        }
                                        C0716s.f8051c = V4.E.y(C0716s.f8050b, null, null, new C0677j(applicationContext, null), 3);
                                        break;
                                    default:
                                        J.f fVar2 = T3.f17405a;
                                        mutableState.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(28));
                                        C0716s c0716s3 = C0716s.f8049a;
                                        C0716s.h(context, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                }
                                return C3137A.f25453a;
                            }
                        };
                        composer.updateRememberedValue(objRememberedValue);
                    }
                    composer.endReplaceGroup();
                    a0.Y0.k((J4.a) objRememberedValue, null, false, null, null, null, AbstractC0501d.f4665e, composer, 805306368, 510);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                }
                break;
            case 1:
                Composer composer2 = (Composer) obj;
                int iIntValue2 = ((Number) obj2).intValue();
                if ((iIntValue2 & 3) == 2 && composer2.getSkipping()) {
                    composer2.skipToGroupEnd();
                } else {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(-1745106998, iIntValue2, -1, "com.debridstream.tv.screens.SettingsScreen.<anonymous>.<anonymous> (SettingsScreen.kt:710)");
                    }
                    composer2.startReplaceGroup(-1583926820);
                    final Context context2 = this.f4805b;
                    boolean zChangedInstance2 = composer2.changedInstance(context2);
                    Object objRememberedValue2 = composer2.rememberedValue();
                    if (zChangedInstance2 || objRememberedValue2 == Composer.Companion.getEmpty()) {
                        final MutableState mutableState2 = this.f4806c;
                        final int i7 = 1;
                        objRememberedValue2 = new J4.a() { // from class: M2.j1
                            @Override // J4.a
                            public final Object invoke() {
                                switch (i7) {
                                    case 0:
                                        MutableState mutableState22 = mutableState2;
                                        J.f fVar = B1.f4224a;
                                        mutableState22.setValue(Boolean.FALSE);
                                        u3.e(new C0556x0(3));
                                        C0716s c0716s = C0716s.f8049a;
                                        C0716s.i(context2, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                    case 1:
                                        Context context22 = context2;
                                        MutableState mutableState3 = mutableState2;
                                        float f6 = G3.f16846a;
                                        mutableState3.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(19));
                                        C0716s c0716s2 = C0716s.f8049a;
                                        kotlin.jvm.internal.o.h(context22, "context");
                                        Context applicationContext = context22.getApplicationContext();
                                        V4.B0 b02 = C0716s.f8051c;
                                        if (b02 != null) {
                                            b02.cancel(null);
                                        }
                                        C0716s.f8051c = V4.E.y(C0716s.f8050b, null, null, new C0677j(applicationContext, null), 3);
                                        break;
                                    default:
                                        J.f fVar2 = T3.f17405a;
                                        mutableState2.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(28));
                                        C0716s c0716s3 = C0716s.f8049a;
                                        C0716s.h(context2, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                }
                                return C3137A.f25453a;
                            }
                        };
                        composer2.updateRememberedValue(objRememberedValue2);
                    }
                    composer2.endReplaceGroup();
                    a0.Y0.k((J4.a) objRememberedValue2, null, false, null, null, null, AbstractC2121h0.f17977e, composer2, 805306368, 510);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                }
                break;
            default:
                Composer composer3 = (Composer) obj;
                int iIntValue3 = ((Number) obj2).intValue();
                if ((iIntValue3 & 3) == 2 && composer3.getSkipping()) {
                    composer3.skipToGroupEnd();
                } else {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(1985402893, iIntValue3, -1, "com.debridstream.tv.screens.SettingsTV2.<anonymous>.<anonymous> (SettingsTV2.kt:689)");
                    }
                    composer3.startReplaceGroup(-1988477991);
                    final Context context3 = this.f4805b;
                    boolean zChangedInstance3 = composer3.changedInstance(context3);
                    Object objRememberedValue3 = composer3.rememberedValue();
                    if (zChangedInstance3 || objRememberedValue3 == Composer.Companion.getEmpty()) {
                        final MutableState mutableState3 = this.f4806c;
                        final int i8 = 2;
                        objRememberedValue3 = new J4.a() { // from class: M2.j1
                            @Override // J4.a
                            public final Object invoke() {
                                switch (i8) {
                                    case 0:
                                        MutableState mutableState22 = mutableState3;
                                        J.f fVar = B1.f4224a;
                                        mutableState22.setValue(Boolean.FALSE);
                                        u3.e(new C0556x0(3));
                                        C0716s c0716s = C0716s.f8049a;
                                        C0716s.i(context3, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                    case 1:
                                        Context context22 = context3;
                                        MutableState mutableState32 = mutableState3;
                                        float f6 = G3.f16846a;
                                        mutableState32.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(19));
                                        C0716s c0716s2 = C0716s.f8049a;
                                        kotlin.jvm.internal.o.h(context22, "context");
                                        Context applicationContext = context22.getApplicationContext();
                                        V4.B0 b02 = C0716s.f8051c;
                                        if (b02 != null) {
                                            b02.cancel(null);
                                        }
                                        C0716s.f8051c = V4.E.y(C0716s.f8050b, null, null, new C0677j(applicationContext, null), 3);
                                        break;
                                    default:
                                        J.f fVar2 = T3.f17405a;
                                        mutableState3.setValue(Boolean.FALSE);
                                        u3.e(new C2112f3(28));
                                        C0716s c0716s3 = C0716s.f8049a;
                                        C0716s.h(context3, "settings_toggle_use_trakt_cw_confirmed");
                                        break;
                                }
                                return C3137A.f25453a;
                            }
                        };
                        composer3.updateRememberedValue(objRememberedValue3);
                    }
                    composer3.endReplaceGroup();
                    a0.Y0.k((J4.a) objRememberedValue3, null, false, null, null, null, AbstractC2127i0.f18021e, composer3, 805306368, 510);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                }
                break;
        }
        return C3137A.f25453a;
    }
}
