package B;

import E.InterfaceC0142c;
import F.AbstractC0158l;
import F.C0169x;
import F.C0170y;
import G0.InterfaceC0245a0;
import J0.C0379q;
import K.C0463l;
import T0.C0596g;
import V.AbstractC0628w;
import V.C0626u;
import V2.AbstractC0693m0;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.view.textclassifier.TextClassification;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerImpl;
import androidx.compose.runtime.ComposerImplKt;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.EffectsKt;
import androidx.compose.runtime.MovableContent;
import androidx.compose.runtime.ProvidableCompositionLocal;
import androidx.compose.runtime.RememberManager;
import androidx.compose.runtime.SlotWriter;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.State;
import androidx.compose.runtime.internal.ComposableLambda;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.runtime.saveable.SaverScope;
import androidx.compose.runtime.saveable.serialization.SerializableSaverKt;
import com.debridstream.tv.data.home.HomeMetaItem;
import h1.C2069a;
import h3.z5;
import java.util.List;
import q2.C2841d;
import w4.C3137A;
import x4.AbstractC3251q;

/* JADX INFO: renamed from: B.y, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class C0096y implements J4.e {

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

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

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

    public /* synthetic */ C0096y(int i6, Object obj, Object obj2) {
        this.f396a = i6;
        this.f398c = obj;
        this.f397b = obj2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) throws Throwable {
        int i6;
        Object obj3;
        int i7;
        T0.N n6;
        Context context;
        boolean z6;
        TextClassification textClassification;
        TextClassification textClassification2 = null;
        C3137A c3137a = C3137A.f25453a;
        Object obj4 = this.f397b;
        Object obj5 = this.f398c;
        switch (this.f396a) {
            case 0:
                G0.C0 c02 = (G0.C0) obj;
                C2069a c2069a = (C2069a) obj2;
                return ((InterfaceC0245a0) obj5).mo1measure3p2s80s(c02, c02.j(c3137a, ComposableLambdaKt.composableLambdaInstance(-431986394, true, new C0096y((ComposableLambda) obj4, new B(c02, c2069a.f16612a), 1))), c2069a.f16612a);
            case 1:
                Composer composer = (Composer) obj;
                int iIntValue = ((Integer) obj2).intValue();
                if (composer.shouldExecute((iIntValue & 3) != 2, iIntValue & 1)) {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(-431986394, iIntValue, -1, "androidx.compose.foundation.layout.BoxWithConstraints.<anonymous>.<anonymous>.<anonymous> (BoxWithConstraints.kt:66)");
                    }
                    ((ComposableLambda) obj4).invoke((B) obj5, composer, 0);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                } else {
                    composer.skipToGroupEnd();
                }
                return c3137a;
            case 2:
                h1.c cVar = (h1.c) obj;
                C2069a c2069a2 = (C2069a) obj2;
                if (C2069a.h(c2069a2.f16612a) == Integer.MAX_VALUE) {
                    A.b.a("LazyVerticalGrid's width should be bound by parent.");
                }
                int iH = C2069a.h(c2069a2.f16612a);
                InterfaceC0063h interfaceC0063h = (InterfaceC0063h) obj4;
                int[] iArrB0 = AbstractC3251q.B0(((InterfaceC0142c) obj5).a(cVar, iH, cVar.g0(interfaceC0063h.a())));
                int[] iArr = new int[iArrB0.length];
                interfaceC0063h.c(cVar, iH, iArrB0, h1.m.f16628a, iArr);
                return new T.p(4, iArrB0, iArr);
            case 3:
                Composer composer2 = (Composer) obj;
                int iIntValue2 = ((Integer) obj2).intValue();
                if (composer2.shouldExecute((iIntValue2 & 3) != 2, iIntValue2 & 1)) {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(818252804, iIntValue2, -1, "androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory.CachedItemContent.createContentLambda.<anonymous> (LazyLayoutItemContentFactory.kt:85)");
                    }
                    C0170y c0170y = (C0170y) obj5;
                    F.B b5 = (F.B) c0170y.f1356b.invoke();
                    C0169x c0169x = (C0169x) obj4;
                    int iD = c0169x.f1352c;
                    int iA = b5.a();
                    Object obj6 = c0169x.f1350a;
                    if (iD >= iA || !b5.b(iD).equals(obj6)) {
                        iD = b5.d(obj6);
                        i6 = -1;
                        if (iD != -1) {
                            c0169x.f1352c = iD;
                        }
                    } else {
                        i6 = -1;
                    }
                    if (iD != i6) {
                        composer2.startReplaceGroup(-1664741271);
                        AbstractC0158l.g(b5, c0170y.f1355a, iD, c0169x.f1350a, composer2, 0);
                    } else {
                        composer2.startReplaceGroup(-1668376610);
                    }
                    composer2.endReplaceGroup();
                    boolean zChangedInstance = composer2.changedInstance(c0169x);
                    Object objRememberedValue = composer2.rememberedValue();
                    if (zChangedInstance || objRememberedValue == Composer.Companion.getEmpty()) {
                        objRememberedValue = new V(c0169x, 7);
                        composer2.updateRememberedValue(objRememberedValue);
                    }
                    EffectsKt.DisposableEffect(obj6, (J4.c) objRememberedValue, composer2, 0);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                } else {
                    composer2.skipToGroupEnd();
                }
                return c3137a;
            case 4:
                return ((F.F) obj4).a(new F.G((C0170y) obj5, (G0.C0) obj), ((C2069a) obj2).f16612a);
            case 5:
                Composer composer3 = (Composer) obj;
                int iIntValue3 = ((Integer) obj2).intValue();
                if (composer3.shouldExecute((iIntValue3 & 3) != 2, iIntValue3 & 1)) {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(-412824043, iIntValue3, -1, "androidx.compose.foundation.lazy.layout.LazySaveableStateHolderProvider.<anonymous> (LazySaveableStateHolder.kt:49)");
                    }
                    ((ComposableLambda) obj4).invoke((F.d0) obj5, composer3, 0);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                } else {
                    composer3.skipToGroupEnd();
                }
                return c3137a;
            case 6:
                float fFloatValue = ((Float) obj).floatValue();
                ((Float) obj2).floatValue();
                kotlin.jvm.internal.z zVar = (kotlin.jvm.internal.z) obj5;
                zVar.f20131a += ((x.G0) ((G.C) obj4).f1651b).a(fFloatValue - zVar.f20131a);
                return c3137a;
            case 7:
                Composer composer4 = (Composer) obj;
                int iIntValue4 = ((Integer) obj2).intValue();
                if (composer4.shouldExecute((iIntValue4 & 3) != 2, iIntValue4 & 1)) {
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventStart(1315155414, iIntValue4, -1, "androidx.compose.foundation.text.contextmenu.internal.OpenContextMenu.<anonymous> (DefaultTextContextMenuDropdownProvider.android.kt:124)");
                    }
                    R.e eVar = (R.e) obj5;
                    boolean zChanged = composer4.changed(eVar);
                    Object objRememberedValue2 = composer4.rememberedValue();
                    if (zChanged || objRememberedValue2 == Composer.Companion.getEmpty()) {
                        objRememberedValue2 = SnapshotStateKt.derivedStateOf(new C0379q(0, eVar, R.e.class, "data", "data()Landroidx/compose/foundation/text/contextmenu/data/TextContextMenuData;", 0, 1));
                        composer4.updateRememberedValue(objRememberedValue2);
                    }
                    P.m.a((N.g) obj4, (N.c) ((State) objRememberedValue2).getValue(), composer4, 0);
                    if (ComposerKt.isTraceInProgress()) {
                        ComposerKt.traceEventEnd();
                    }
                } else {
                    composer4.skipToGroupEnd();
                }
                return c3137a;
            case 8:
                M.a aVar = (M.a) obj;
                Context context2 = (Context) obj2;
                V.i0 i0Var = (V.i0) obj5;
                boolean zL = i0Var.l();
                C0596g c0596gO = i0Var.o();
                String str = c0596gO != null ? c0596gO.f6510b : null;
                T0.N n7 = i0Var.f7102w;
                if (n7 != null) {
                    Z0.r rVar = i0Var.f7082b;
                    obj3 = obj4;
                    i7 = 1;
                    long j4 = n7.f6483a;
                    n6 = new T0.N(android.support.v4.media.session.b.g(rVar.b((int) (j4 >> 32)), rVar.b((int) (4294967295L & j4))));
                } else {
                    obj3 = obj4;
                    i7 = 1;
                    n6 = null;
                }
                C0626u c0626u = i0Var.f7090j;
                C0463l c0463l = new C0463l(i0Var, (V4.C) obj3, context2, 11);
                ProvidableCompositionLocal providableCompositionLocal = AbstractC0628w.f7174a;
                if (Build.VERSION.SDK_INT < 28 || str == null || n6 == null || c0626u == null || !(c0626u instanceof C0626u)) {
                    c0463l.invoke(aVar);
                    if (str != null && n6 != null) {
                        L.b.a(aVar, context2, zL, str, n6.f6483a);
                    }
                } else {
                    e5.c cVar2 = c0626u.f7169e;
                    if (cVar2.f()) {
                        V.U u6 = (V.U) c0626u.f7171g.getValue();
                        if (u6 != null) {
                            context = context2;
                            z6 = zL;
                            if (T0.N.b(n6.f6483a, u6.f7005b) && kotlin.jvm.internal.o.c(str, u6.f7004a)) {
                                textClassification = u6.f7006c;
                            }
                            cVar2.g(null);
                            textClassification2 = textClassification;
                        } else {
                            context = context2;
                            z6 = zL;
                        }
                        textClassification = null;
                        cVar2.g(null);
                        textClassification2 = textClassification;
                    } else {
                        context = context2;
                        z6 = zL;
                    }
                    if (textClassification2 == null) {
                        c0463l.invoke(aVar);
                    } else {
                        boolean zIsEmpty = textClassification2.getActions().isEmpty();
                        Object obj7 = c0626u.f7172h;
                        if (!zIsEmpty) {
                            aVar.f4195a.g(new N.h(obj7, textClassification2, 0));
                        } else if ((textClassification2.getIcon() != null || !TextUtils.isEmpty(textClassification2.getLabel())) && (textClassification2.getIntent() != null || textClassification2.getOnClickListener() != null)) {
                            aVar.f4195a.g(new N.h(obj7, textClassification2, -1));
                        }
                        c0463l.invoke(aVar);
                        List actions = textClassification2.getActions();
                        int size = actions.size();
                        for (int i8 = 0; i8 < size; i8 += i7) {
                            G1.c.w(actions.get(i8));
                            if (i8 > 0) {
                                aVar.f4195a.g(new N.h(obj7, textClassification2, i8));
                            }
                        }
                    }
                    L.b.a(aVar, context, z6, str, n6.f6483a);
                }
                return c3137a;
            case 9:
                int iIntValue5 = ((Integer) obj).intValue();
                String personName = (String) obj2;
                kotlin.jvm.internal.o.h(personName, "personName");
                String strEncode = Uri.encode(personName);
                q.F0 f0 = AbstractC0693m0.f7892a;
                HomeMetaItem homeMetaItem = ((z5) ((State) obj4).getValue()).f18777a;
                androidx.navigation.H.n((androidx.navigation.H) obj5, "catalog_browse/person/" + iIntValue5 + "?title=" + strEncode + "&media=" + (kotlin.jvm.internal.o.c(homeMetaItem != null ? homeMetaItem.getType() : null, "tv") ? "tv" : "movies"), null, 6);
                return c3137a;
            case 10:
                return ComposerImpl.invokeMovableContentLambda$lambda$0((MovableContent) obj5, obj4, (Composer) obj, ((Integer) obj2).intValue());
            case 11:
                return ComposerImplKt.deactivateCurrentGroup$lambda$0((RememberManager) obj5, (SlotWriter) obj4, ((Integer) obj).intValue(), obj2);
            case 12:
                return SerializableSaverKt.serializableSaver$lambda$0((g5.a) obj5, (C2841d) obj4, (SaverScope) obj, obj2);
            default:
                float fFloatValue2 = ((Float) obj).floatValue();
                ((Float) obj2).floatValue();
                kotlin.jvm.internal.z zVar2 = (kotlin.jvm.internal.z) obj5;
                float f6 = zVar2.f20131a;
                zVar2.f20131a = ((x.G0) obj4).a(fFloatValue2 - f6) + f6;
                return c3137a;
        }
    }

    public /* synthetic */ C0096y(ComposableLambda composableLambda, Object obj, int i6) {
        this.f396a = i6;
        this.f397b = composableLambda;
        this.f398c = obj;
    }
}
