package h3;

import androidx.compose.runtime.MutableIntState;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import com.debridstream.tv.HomeSection;
import java.util.HashMap;
import java.util.List;
import n2.AbstractC2612c;
import w4.C3137A;
import x4.AbstractC3251q;
import x4.AbstractC3252r;
import y4.C3274b;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class J3 implements J4.a {

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ State f16977d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ State f16978e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ Object f16979f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final /* synthetic */ Object f16980j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final /* synthetic */ State f16981k;
    public final /* synthetic */ State l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final /* synthetic */ State f16982m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final /* synthetic */ State f16983n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final /* synthetic */ State f16984o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public final /* synthetic */ Object f16985p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ Object f16986q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final /* synthetic */ State f16987r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final /* synthetic */ State f16988s;

    public /* synthetic */ J3(String str, boolean z6, String str2, State state, State state2, State state3, State state4, State state5, State state6, State state7, State state8, State state9, State state10, State state11, State state12) {
        this.f16979f = str;
        this.f16975b = z6;
        this.f16980j = str2;
        this.f16976c = state;
        this.f16977d = state2;
        this.f16978e = state3;
        this.f16981k = state4;
        this.l = state5;
        this.f16982m = state6;
        this.f16983n = state7;
        this.f16984o = state8;
        this.f16985p = state9;
        this.f16986q = state10;
        this.f16987r = state11;
        this.f16988s = state12;
    }

    @Override // J4.a
    public final Object invoke() {
        State state = this.f16978e;
        boolean z6 = this.f16975b;
        State state2 = this.f16987r;
        State state3 = this.f16977d;
        State state4 = this.f16988s;
        Object obj = this.f16986q;
        Object obj2 = this.f16985p;
        State state5 = this.f16984o;
        State state6 = this.f16983n;
        State state7 = this.f16982m;
        Object obj3 = this.f16980j;
        State state8 = this.l;
        State state9 = this.f16981k;
        State state10 = this.f16976c;
        Object obj4 = this.f16979f;
        switch (this.f16974a) {
            case 0:
                C3274b c3274bK = AbstractC2612c.k();
                c3274bK.add(new C2082b("Account Details", (String) state10.getValue(), W.b.d0(), "ACCOUNT", false, 48));
                c3274bK.add(new C2082b("Switch Profile", "Current: " + ((String) obj4), W.d.s(), (String) null, false, 56));
                c3274bK.add(new C2082b("Preferred Addons", (String) state3.getValue(), W.b.e0(), "ADD-ONS", false, 48));
                c3274bK.add(new C2082b("Choose Debrid Service", (String) state.getValue(), W.a.g0(), "DEBRID SERVICE", false, 48));
                c3274bK.add(new C2082b("Filter Sources", (String) state9.getValue(), W.a.n0(), "LINK FILTERING", false, 48));
                c3274bK.add(new C2082b("Strict Title Match", (String) state8.getValue(), W.c.L(), (String) null, ((V2.n3) state7.getValue()).f7974d.f7379b, 8));
                c3274bK.add(new C2082b("Default Subtitle Language", (String) state6.getValue(), W.c.J(), "VIDEO PLAYER", false, 48));
                c3274bK.add(new C2082b("Default Audio Language", (String) state5.getValue(), W.d.t(), (String) null, false, 56));
                c3274bK.add(new C2082b("Dolby Vision", (String) ((State) obj2).getValue(), android.support.v4.media.session.b.t(), (String) null, false, 56));
                c3274bK.add(new C2082b("Others", (String) null, W.b.g0(), (String) null, false, 58));
                if (z6) {
                    c3274bK.add(new C2082b("Link Trakt", (String) null, W.a.g0(), "TRAKT", false, 50));
                }
                c3274bK.add(new C2082b("Trailers", (String) ((State) obj).getValue(), W.b.g0(), "MISC", false, 48));
                c3274bK.add(new C2082b("Hide Japanese / Korean search results", ((V2.n3) state7.getValue()).f7978h.f7862a ? "Hidden" : "Not hidden", W.c.L(), (String) null, true, ((V2.n3) state7.getValue()).f7978h.f7862a));
                c3274bK.add(new C2082b("Use Cinemeta for episode enrichment", ((V2.n3) state7.getValue()).f7972b.f7760d ? "Enabled" : "Disabled", W.b.g0(), (String) null, ((V2.n3) state7.getValue()).f7972b.f7760d, 8));
                c3274bK.add(new C2082b("Region", (String) state2.getValue(), W.c.G(), "REGION", false, 48));
                c3274bK.add(new C2082b("Current theme", (String) state4.getValue(), W.b.k0(), "THEMES", false, 48));
                c3274bK.add(new C2082b("Debrid Stream", (String) obj3, W0.e.y(), "ABOUT", false, 48));
                return AbstractC2612c.e(c3274bK);
            default:
                float f6 = n5.f18281a;
                MutableIntState mutableIntState = (MutableIntState) obj4;
                if (mutableIntState.getIntValue() == -1) {
                    ((J4.a) state10.getValue()).invoke();
                } else {
                    MutableState mutableState = (MutableState) state9;
                    MutableIntState mutableIntState2 = (MutableIntState) state8;
                    MutableState mutableState2 = (MutableState) obj3;
                    if (mutableIntState.getIntValue() == -2) {
                        n5.r(mutableState2, mutableState);
                        mutableIntState.setIntValue(-1);
                        mutableIntState2.setIntValue(0);
                    } else {
                        n5.s((MutableState) state7, (MutableState) state6);
                        n5.r(mutableState2, mutableState);
                        n5.t((MutableState) state5, false);
                        int intValue = mutableIntState.getIntValue();
                        int intValue2 = mutableIntState2.getIntValue();
                        List list = (List) obj2;
                        HomeSection homeSection = (HomeSection) AbstractC3251q.h0(intValue, list);
                        HashMap map = (HashMap) obj;
                        if (homeSection != null) {
                            map.put(homeSection.getId(), Integer.valueOf(intValue2));
                        }
                        MutableIntState mutableIntState3 = (MutableIntState) state4;
                        if (mutableIntState.getIntValue() > 0) {
                            int intValue3 = mutableIntState.getIntValue() - 1;
                            mutableIntState.setIntValue(intValue3);
                            int iA = Y4.a(list, map, state, intValue3);
                            mutableIntState3.setIntValue(iA);
                            mutableIntState2.setIntValue(iA);
                        } else if (!((List) state3.getValue()).isEmpty()) {
                            mutableIntState.setIntValue(-2);
                            MutableIntState mutableIntState4 = (MutableIntState) state2;
                            mutableIntState4.setIntValue(L4.a.v(mutableIntState4.getIntValue(), 0, AbstractC3252r.A((List) state3.getValue())));
                            mutableIntState2.setIntValue(0);
                        } else if (z6) {
                            mutableIntState.setIntValue(-1);
                            mutableIntState2.setIntValue(0);
                            mutableIntState3.setIntValue(0);
                        } else {
                            ((J4.a) state10.getValue()).invoke();
                        }
                    }
                }
                return C3137A.f25453a;
        }
    }

    public /* synthetic */ J3(boolean z6, MutableIntState mutableIntState, State state, MutableState mutableState, MutableState mutableState2, MutableIntState mutableIntState2, MutableState mutableState3, MutableState mutableState4, MutableState mutableState5, List list, HashMap map, State state2, MutableIntState mutableIntState3, MutableIntState mutableIntState4, State state3) {
        this.f16975b = z6;
        this.f16979f = mutableIntState;
        this.f16976c = state;
        this.f16980j = mutableState;
        this.f16981k = mutableState2;
        this.l = mutableIntState2;
        this.f16982m = mutableState3;
        this.f16983n = mutableState4;
        this.f16984o = mutableState5;
        this.f16985p = list;
        this.f16986q = map;
        this.f16977d = state2;
        this.f16987r = mutableIntState3;
        this.f16988s = mutableIntState4;
        this.f16978e = state3;
    }
}
