package com.revenuecat.purchases.ui.revenuecatui.composables;

import B.AbstractC0084s;
import B.C0094x;
import B.U0;
import E3.v;
import G0.C0269n;
import G0.InterfaceC0245a0;
import I.f;
import I0.C0289e;
import I0.C0291f;
import I0.C0293g;
import I0.InterfaceC0295h;
import J.g;
import J4.c;
import J4.e;
import Q0.j;
import a0.AbstractC0913k1;
import a0.AbstractC0927p0;
import a0.C0910j1;
import a0.C0956z0;
import a0.I;
import a0.J;
import a0.Q;
import a0.Z0;
import androidx.compose.runtime.Composable;
import androidx.compose.runtime.ComposableInferredTarget;
import androidx.compose.runtime.ComposablesKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.CompositionLocalKt;
import androidx.compose.runtime.CompositionLocalMap;
import androidx.compose.runtime.ProvidedValue;
import androidx.compose.runtime.ReadOnlyComposable;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.Stable;
import androidx.compose.runtime.Updater;
import androidx.media3.common.C;
import androidx.media3.exoplayer.RendererCapabilities;
import androidx.media3.exoplayer.source.ProgressiveMediaSource;
import com.revenuecat.purchases.ui.revenuecatui.components.modifier.BackgroundKt;
import com.revenuecat.purchases.ui.revenuecatui.components.modifier.BorderKt;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ColorStyle;
import i0.AbstractC2237a;
import i0.C2239c;
import i0.C2252p;
import i0.InterfaceC2255s;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import p0.C2714u;
import p0.X;
import q.AbstractC2761L;
import q.C2786l0;
import q.F0;
import q.InterfaceC2807y;
import v.AbstractC3044q0;
import w4.C3137A;
import z.k;
import z.l;

/* JADX INFO: loaded from: classes3.dex */
public final class SwitchKt {
    private static final F0 AnimationSpec;
    private static final C2786l0 SnapSpec;
    private static final float SwitchHeight;
    private static final float SwitchWidth;
    private static final float ThumbDiameter;
    private static final float ThumbPadding;
    private static final float UncheckedThumbDiameter;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.composables.SwitchKt$Switch$1, reason: invalid class name */
    public static final class AnonymousClass1 extends p implements e {
        final /* synthetic */ int $$changed;
        final /* synthetic */ int $$default;
        final /* synthetic */ boolean $checked;
        final /* synthetic */ SwitchColors $colors;
        final /* synthetic */ boolean $enabled;
        final /* synthetic */ l $interactionSource;
        final /* synthetic */ InterfaceC2255s $modifier;
        final /* synthetic */ c $onCheckedChange;
        final /* synthetic */ e $thumbContent;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass1(boolean z6, c cVar, InterfaceC2255s interfaceC2255s, e eVar, boolean z7, SwitchColors switchColors, l lVar, int i6, int i7) {
            super(2);
            this.$checked = z6;
            this.$onCheckedChange = cVar;
            this.$modifier = interfaceC2255s;
            this.$thumbContent = eVar;
            this.$enabled = z7;
            this.$colors = switchColors;
            this.$interactionSource = lVar;
            this.$$changed = i6;
            this.$$default = i7;
        }

        @Override // J4.e
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            invoke((Composer) obj, ((Number) obj2).intValue());
            return C3137A.f25453a;
        }

        public final void invoke(Composer composer, int i6) {
            SwitchKt.Switch(this.$checked, this.$onCheckedChange, this.$modifier, this.$thumbContent, this.$enabled, this.$colors, this.$interactionSource, composer, RecomposeScopeImplKt.updateChangedFlags(this.$$changed | 1), this.$$default);
        }
    }

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.composables.SwitchKt$SwitchImpl$2, reason: invalid class name */
    public static final class AnonymousClass2 extends p implements e {
        final /* synthetic */ int $$changed;
        final /* synthetic */ boolean $checked;
        final /* synthetic */ SwitchColors $colors;
        final /* synthetic */ boolean $enabled;
        final /* synthetic */ k $interactionSource;
        final /* synthetic */ InterfaceC2255s $modifier;
        final /* synthetic */ e $thumbContent;
        final /* synthetic */ X $thumbShape;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass2(InterfaceC2255s interfaceC2255s, boolean z6, boolean z7, SwitchColors switchColors, e eVar, k kVar, X x6, int i6) {
            super(2);
            this.$modifier = interfaceC2255s;
            this.$checked = z6;
            this.$enabled = z7;
            this.$colors = switchColors;
            this.$thumbContent = eVar;
            this.$interactionSource = kVar;
            this.$thumbShape = x6;
            this.$$changed = i6;
        }

        @Override // J4.e
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            invoke((Composer) obj, ((Number) obj2).intValue());
            return C3137A.f25453a;
        }

        public final void invoke(Composer composer, int i6) {
            SwitchKt.SwitchImpl(this.$modifier, this.$checked, this.$enabled, this.$colors, this.$thumbContent, this.$interactionSource, this.$thumbShape, composer, RecomposeScopeImplKt.updateChangedFlags(this.$$changed | 1));
        }
    }

    public /* synthetic */ class WhenMappings {
        public static final /* synthetic */ int[] $EnumSwitchMapping$0;
        public static final /* synthetic */ int[] $EnumSwitchMapping$1;

        static {
            int[] iArr = new int[ShapeKeyTokens.values().length];
            try {
                iArr[ShapeKeyTokens.CornerFull.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            $EnumSwitchMapping$0 = iArr;
            int[] iArr2 = new int[ColorSchemeKeyTokens.values().length];
            try {
                iArr2[ColorSchemeKeyTokens.OnPrimary.ordinal()] = 1;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.OnPrimaryContainer.ordinal()] = 2;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.OnSurface.ordinal()] = 3;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.Outline.ordinal()] = 4;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.Primary.ordinal()] = 5;
            } catch (NoSuchFieldError unused6) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.Surface.ordinal()] = 6;
            } catch (NoSuchFieldError unused7) {
            }
            try {
                iArr2[ColorSchemeKeyTokens.SurfaceContainerHighest.ordinal()] = 7;
            } catch (NoSuchFieldError unused8) {
            }
            $EnumSwitchMapping$1 = iArr2;
        }
    }

    static {
        SwitchTokens switchTokens = SwitchTokens.INSTANCE;
        float fM891getSelectedHandleWidthD9Ej5fM = switchTokens.m891getSelectedHandleWidthD9Ej5fM();
        ThumbDiameter = fM891getSelectedHandleWidthD9Ej5fM;
        UncheckedThumbDiameter = switchTokens.m896getUnselectedHandleWidthD9Ej5fM();
        SwitchWidth = switchTokens.m895getTrackWidthD9Ej5fM();
        float fM893getTrackHeightD9Ej5fM = switchTokens.m893getTrackHeightD9Ej5fM();
        SwitchHeight = fM893getTrackHeightD9Ej5fM;
        ThumbPadding = (fM893getTrackHeightD9Ej5fM - fM891getSelectedHandleWidthD9Ej5fM) / 2;
        SnapSpec = new C2786l0();
        AnimationSpec = new F0(100, (InterfaceC2807y) null, 6);
    }

    /* JADX WARN: Removed duplicated region for block: B:101:0x0135  */
    /* JADX WARN: Removed duplicated region for block: B:102:0x0138  */
    /* JADX WARN: Removed duplicated region for block: B:105:0x013d  */
    /* JADX WARN: Removed duplicated region for block: B:106:0x016f  */
    /* JADX WARN: Removed duplicated region for block: B:109:0x0177  */
    /* JADX WARN: Removed duplicated region for block: B:113:0x0184  */
    /* JADX WARN: Removed duplicated region for block: B:116:0x0192  */
    /* JADX WARN: Removed duplicated region for block: B:120:0x01af  */
    /* JADX WARN: Removed duplicated region for block: B:123:0x01b5  */
    /* JADX WARN: Removed duplicated region for block: B:126:0x020f  */
    /* JADX WARN: Removed duplicated region for block: B:130:0x021c  */
    /* JADX WARN: Removed duplicated region for block: B:132:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:36:0x0067  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x006c  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x0082  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x0087  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x00a0  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00ba  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x00c4  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x00cd  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x00ee  */
    /* JADX WARN: Removed duplicated region for block: B:84:0x00ff  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x0124  */
    /* JADX WARN: Removed duplicated region for block: B:94:0x0126  */
    /* JADX WARN: Removed duplicated region for block: B:95:0x0129  */
    /* JADX WARN: Removed duplicated region for block: B:98:0x012e  */
    /* JADX WARN: Removed duplicated region for block: B:99:0x0131  */
    @Composable
    @ComposableInferredTarget(scheme = "[androidx.compose.ui.UiComposable[androidx.compose.ui.UiComposable]]")
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void Switch(boolean z6, c cVar, InterfaceC2255s interfaceC2255s, e eVar, boolean z7, SwitchColors switchColors, l lVar, Composer composer, int i6, int i7) {
        int i8;
        InterfaceC2255s interfaceC2255s2;
        int i9;
        e eVar2;
        int i10;
        boolean z8;
        SwitchColors switchColorsM889colorslRJcREg;
        int i11;
        boolean z9;
        l lVar2;
        int i12;
        int i13;
        InterfaceC2255s interfaceC2255sA;
        InterfaceC2255s interfaceC2255s3;
        Composer composer2;
        int i14;
        boolean z10;
        SwitchColors switchColors2;
        int i15;
        e eVar3;
        l lVar3;
        Composer composer3;
        InterfaceC2255s interfaceC2255s4;
        boolean z11;
        SwitchColors switchColors3;
        e eVar4;
        ScopeUpdateScope scopeUpdateScopeEndRestartGroup;
        int i16;
        Composer composerStartRestartGroup = composer.startRestartGroup(1449171266);
        if ((i7 & 1) != 0) {
            i8 = i6 | 6;
        } else if ((i6 & 6) == 0) {
            i8 = (composerStartRestartGroup.changed(z6) ? 4 : 2) | i6;
        } else {
            i8 = i6;
        }
        if ((i7 & 2) != 0) {
            i8 |= 48;
        } else if ((i6 & 48) == 0) {
            i8 |= composerStartRestartGroup.changedInstance(cVar) ? 32 : 16;
        }
        int i17 = i7 & 4;
        if (i17 != 0) {
            i8 |= RendererCapabilities.DECODER_SUPPORT_MASK;
        } else {
            if ((i6 & RendererCapabilities.DECODER_SUPPORT_MASK) == 0) {
                interfaceC2255s2 = interfaceC2255s;
                i8 |= composerStartRestartGroup.changed(interfaceC2255s2) ? 256 : 128;
            }
            i9 = i7 & 8;
            if (i9 == 0) {
                i8 |= 3072;
            } else {
                if ((i6 & 3072) == 0) {
                    eVar2 = eVar;
                    i8 |= composerStartRestartGroup.changedInstance(eVar2) ? 2048 : 1024;
                }
                i10 = i7 & 16;
                if (i10 == 0) {
                    if ((i6 & 24576) == 0) {
                        z8 = z7;
                        i8 |= composerStartRestartGroup.changed(z8) ? 16384 : 8192;
                    }
                    if ((i6 & 196608) != 0) {
                        if ((i7 & 32) == 0) {
                            switchColorsM889colorslRJcREg = switchColors;
                            if (composerStartRestartGroup.changed(switchColorsM889colorslRJcREg)) {
                                i16 = 131072;
                            }
                            i8 |= i16;
                        } else {
                            switchColorsM889colorslRJcREg = switchColors;
                        }
                        i16 = C.DEFAULT_BUFFER_SEGMENT_SIZE;
                        i8 |= i16;
                    } else {
                        switchColorsM889colorslRJcREg = switchColors;
                    }
                    i11 = i7 & 64;
                    if (i11 == 0) {
                        z9 = true;
                        i12 = i8 | 1572864;
                        lVar2 = lVar;
                    } else {
                        z9 = true;
                        lVar2 = lVar;
                        if ((i6 & 1572864) == 0) {
                            i8 |= composerStartRestartGroup.changed(lVar2) ? ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES : 524288;
                        }
                        i12 = i8;
                    }
                    if ((i12 & 599187) == 599186 || !composerStartRestartGroup.getSkipping()) {
                        composerStartRestartGroup.startDefaults();
                        i13 = i6 & 1;
                        interfaceC2255sA = C2252p.f18820a;
                        if (i13 != 0 || composerStartRestartGroup.getDefaultsInvalid()) {
                            interfaceC2255s3 = i17 == 0 ? interfaceC2255sA : interfaceC2255s2;
                            e eVar5 = i9 == 0 ? null : eVar2;
                            boolean z12 = i10 == 0 ? z9 : z8;
                            if ((i7 & 32) == 0) {
                                i14 = 2;
                                switchColorsM889colorslRJcREg = SwitchDefaults.INSTANCE.m889colorslRJcREg(null, null, null, 0L, null, null, null, 0L, null, null, null, 0L, null, null, null, 0L, composerStartRestartGroup, 0, 1572864, 65535);
                                composer2 = composerStartRestartGroup;
                                i12 &= -458753;
                            } else {
                                composer2 = composerStartRestartGroup;
                                i14 = 2;
                            }
                            z10 = z12;
                            switchColors2 = switchColorsM889colorslRJcREg;
                            i15 = i12;
                            if (i11 != 0) {
                                lVar2 = null;
                            }
                            eVar3 = eVar5;
                        } else {
                            composerStartRestartGroup.skipToGroupEnd();
                            if ((i7 & 32) != 0) {
                                i12 &= -458753;
                            }
                            composer2 = composerStartRestartGroup;
                            interfaceC2255s3 = interfaceC2255s2;
                            eVar3 = eVar2;
                            z10 = z8;
                            i15 = i12;
                            i14 = 2;
                            switchColors2 = switchColorsM889colorslRJcREg;
                        }
                        composer2.endDefaults();
                        if (ComposerKt.isTraceInProgress()) {
                            ComposerKt.traceEventStart(1449171266, i15, -1, "com.revenuecat.purchases.ui.revenuecatui.composables.Switch (Switch.kt:64)");
                        }
                        composer2.startReplaceGroup(-1205391263);
                        if (lVar2 != null) {
                            composer2.startReplaceGroup(-1205390612);
                            Object objRememberedValue = composer2.rememberedValue();
                            if (objRememberedValue == Composer.Companion.getEmpty()) {
                                objRememberedValue = AbstractC2761L.j(composer2);
                            }
                            composer2.endReplaceGroup();
                            lVar3 = (l) objRememberedValue;
                        } else {
                            lVar3 = lVar2;
                        }
                        composer2.endReplaceGroup();
                        if (cVar != null) {
                            C0269n c0269n = AbstractC0927p0.f10124a;
                            boolean z13 = z10;
                            l lVar4 = lVar3;
                            interfaceC2255sA = f.a(C0956z0.f10356a, z6, lVar4, z13, new j(i14), cVar);
                            lVar3 = lVar4;
                            z10 = z13;
                        }
                        int i18 = i15 << 3;
                        int i19 = i15 >> 6;
                        Composer composer4 = composer2;
                        SwitchImpl(U0.m(U0.x(interfaceC2255s3.then(interfaceC2255sA), i14), SwitchWidth, SwitchHeight), z6, z10, switchColors2, eVar3, lVar3, getValue(SwitchTokens.INSTANCE.getHandleShape(), composer2, 6), composer4, (i19 & 7168) | (i19 & 896) | (i18 & 112) | (57344 & i18));
                        composer3 = composer4;
                        if (ComposerKt.isTraceInProgress()) {
                            ComposerKt.traceEventEnd();
                        }
                        interfaceC2255s4 = interfaceC2255s3;
                        z11 = z10;
                        switchColors3 = switchColors2;
                        eVar4 = eVar3;
                    } else {
                        composerStartRestartGroup.skipToGroupEnd();
                        composer3 = composerStartRestartGroup;
                        interfaceC2255s4 = interfaceC2255s2;
                        z11 = z8;
                        switchColors3 = switchColorsM889colorslRJcREg;
                        eVar4 = eVar2;
                    }
                    scopeUpdateScopeEndRestartGroup = composer3.endRestartGroup();
                    if (scopeUpdateScopeEndRestartGroup == null) {
                        scopeUpdateScopeEndRestartGroup.updateScope(new AnonymousClass1(z6, cVar, interfaceC2255s4, eVar4, z11, switchColors3, lVar2, i6, i7));
                        return;
                    }
                    return;
                }
                i8 |= 24576;
                z8 = z7;
                if ((i6 & 196608) != 0) {
                }
                i11 = i7 & 64;
                if (i11 == 0) {
                }
                if ((i12 & 599187) == 599186) {
                    composerStartRestartGroup.startDefaults();
                    i13 = i6 & 1;
                    interfaceC2255sA = C2252p.f18820a;
                    if (i13 != 0) {
                        if (i17 == 0) {
                        }
                        if (i9 == 0) {
                        }
                        if (i10 == 0) {
                        }
                        if ((i7 & 32) == 0) {
                        }
                        z10 = z12;
                        switchColors2 = switchColorsM889colorslRJcREg;
                        i15 = i12;
                        if (i11 != 0) {
                        }
                        eVar3 = eVar5;
                        composer2.endDefaults();
                        if (ComposerKt.isTraceInProgress()) {
                        }
                        composer2.startReplaceGroup(-1205391263);
                        if (lVar2 != null) {
                        }
                        composer2.endReplaceGroup();
                        if (cVar != null) {
                        }
                        int i182 = i15 << 3;
                        int i192 = i15 >> 6;
                        Composer composer42 = composer2;
                        SwitchImpl(U0.m(U0.x(interfaceC2255s3.then(interfaceC2255sA), i14), SwitchWidth, SwitchHeight), z6, z10, switchColors2, eVar3, lVar3, getValue(SwitchTokens.INSTANCE.getHandleShape(), composer2, 6), composer42, (i192 & 7168) | (i192 & 896) | (i182 & 112) | (57344 & i182));
                        composer3 = composer42;
                        if (ComposerKt.isTraceInProgress()) {
                        }
                        interfaceC2255s4 = interfaceC2255s3;
                        z11 = z10;
                        switchColors3 = switchColors2;
                        eVar4 = eVar3;
                    }
                }
                scopeUpdateScopeEndRestartGroup = composer3.endRestartGroup();
                if (scopeUpdateScopeEndRestartGroup == null) {
                }
            }
            eVar2 = eVar;
            i10 = i7 & 16;
            if (i10 == 0) {
            }
            z8 = z7;
            if ((i6 & 196608) != 0) {
            }
            i11 = i7 & 64;
            if (i11 == 0) {
            }
            if ((i12 & 599187) == 599186) {
            }
            scopeUpdateScopeEndRestartGroup = composer3.endRestartGroup();
            if (scopeUpdateScopeEndRestartGroup == null) {
            }
        }
        interfaceC2255s2 = interfaceC2255s;
        i9 = i7 & 8;
        if (i9 == 0) {
        }
        eVar2 = eVar;
        i10 = i7 & 16;
        if (i10 == 0) {
        }
        z8 = z7;
        if ((i6 & 196608) != 0) {
        }
        i11 = i7 & 64;
        if (i11 == 0) {
        }
        if ((i12 & 599187) == 599186) {
        }
        scopeUpdateScopeEndRestartGroup = composer3.endRestartGroup();
        if (scopeUpdateScopeEndRestartGroup == null) {
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Removed duplicated region for block: B:77:0x0175  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x0181  */
    /* JADX WARN: Removed duplicated region for block: B:81:0x0185  */
    /* JADX WARN: Removed duplicated region for block: B:86:0x01a0  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x01ae  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x01ca  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x01db  */
    @Composable
    @ComposableInferredTarget(scheme = "[androidx.compose.ui.UiComposable[androidx.compose.ui.UiComposable]]")
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void SwitchImpl(InterfaceC2255s interfaceC2255s, boolean z6, boolean z7, SwitchColors switchColors, e eVar, k kVar, X x6, Composer composer, int i6) {
        int i7;
        SwitchTokens switchTokens;
        int currentCompositeKeyHash;
        Composer composerD;
        e eVar2 = eVar;
        Composer composerStartRestartGroup = composer.startRestartGroup(871043204);
        if ((i6 & 6) == 0) {
            i7 = (composerStartRestartGroup.changed(interfaceC2255s) ? 4 : 2) | i6;
        } else {
            i7 = i6;
        }
        if ((i6 & 48) == 0) {
            i7 |= composerStartRestartGroup.changed(z6) ? 32 : 16;
        }
        if ((i6 & RendererCapabilities.DECODER_SUPPORT_MASK) == 0) {
            i7 |= composerStartRestartGroup.changed(z7) ? 256 : 128;
        }
        if ((i6 & 3072) == 0) {
            i7 |= composerStartRestartGroup.changed(switchColors) ? 2048 : 1024;
        }
        if ((i6 & 24576) == 0) {
            i7 |= composerStartRestartGroup.changedInstance(eVar2) ? 16384 : 8192;
        }
        if ((196608 & i6) == 0) {
            i7 |= composerStartRestartGroup.changed(kVar) ? 131072 : C.DEFAULT_BUFFER_SEGMENT_SIZE;
        }
        if ((1572864 & i6) == 0) {
            i7 |= composerStartRestartGroup.changed(x6) ? ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES : 524288;
        }
        if ((599187 & i7) == 599186 && composerStartRestartGroup.getSkipping()) {
            composerStartRestartGroup.skipToGroupEnd();
        } else {
            if (ComposerKt.isTraceInProgress()) {
                ComposerKt.traceEventStart(871043204, i7, -1, "com.revenuecat.purchases.ui.revenuecatui.composables.SwitchImpl (Switch.kt:256)");
            }
            ColorStyle colorStyleTrackColor$revenuecatui_defaultsBc8Release = switchColors.trackColor$revenuecatui_defaultsBc8Release(z7, z6);
            ColorStyle colorStyleThumbColor$revenuecatui_defaultsBc8Release = switchColors.thumbColor$revenuecatui_defaultsBc8Release(z7, z6);
            SwitchTokens switchTokens2 = SwitchTokens.INSTANCE;
            X value = getValue(switchTokens2.getTrackShape(), composerStartRestartGroup, 6);
            InterfaceC2255s interfaceC2255sBackground = BackgroundKt.background(BorderKt.m697borderziNgDLE(interfaceC2255s, switchTokens2.m894getTrackOutlineWidthD9Ej5fM(), switchColors.borderColor$revenuecatui_defaultsBc8Release(z7, z6), value), colorStyleTrackColor$revenuecatui_defaultsBc8Release, value);
            InterfaceC0245a0 interfaceC0245a0D = AbstractC0084s.d(C2239c.f18794a, false);
            int currentCompositeKeyHash2 = ComposablesKt.getCurrentCompositeKeyHash(composerStartRestartGroup, 0);
            CompositionLocalMap currentCompositionLocalMap = composerStartRestartGroup.getCurrentCompositionLocalMap();
            InterfaceC2255s interfaceC2255sC = AbstractC2237a.c(composerStartRestartGroup, interfaceC2255sBackground);
            InterfaceC0295h.f2384g.getClass();
            C0291f c0291f = C0293g.f2375b;
            if (composerStartRestartGroup.getApplier() == null) {
                ComposablesKt.invalidApplier();
            }
            composerStartRestartGroup.startReusableNode();
            if (composerStartRestartGroup.getInserting()) {
                composerStartRestartGroup.createNode(c0291f);
            } else {
                composerStartRestartGroup.useNode();
            }
            Composer composerM81constructorimpl = Updater.m81constructorimpl(composerStartRestartGroup);
            int i8 = i7;
            C0289e c0289e = C0293g.f2379f;
            Updater.m89setimpl(composerM81constructorimpl, interfaceC0245a0D, c0289e);
            C0289e c0289e2 = C0293g.f2378e;
            Updater.m89setimpl(composerM81constructorimpl, currentCompositionLocalMap, c0289e2);
            C0289e c0289e3 = C0293g.f2380g;
            if (composerM81constructorimpl.getInserting()) {
                switchTokens = switchTokens2;
            } else {
                switchTokens = switchTokens2;
                if (!o.c(composerM81constructorimpl.rememberedValue(), Integer.valueOf(currentCompositeKeyHash2))) {
                }
                C0289e c0289e4 = C0293g.f2377d;
                Updater.m89setimpl(composerM81constructorimpl, interfaceC2255sC, c0289e4);
                InterfaceC2255s interfaceC2255sBackground2 = BackgroundKt.background(AbstractC3044q0.a(C0094x.f393a.align(C2252p.f18820a, C2239c.f18797d).then(new ThumbElement(kVar, z6)), kVar, Z0.a(switchTokens.m892getStateLayerSizeD9Ej5fM() / 2, 4, false)), colorStyleThumbColor$revenuecatui_defaultsBc8Release, x6);
                InterfaceC0245a0 interfaceC0245a0D2 = AbstractC0084s.d(C2239c.f18798e, false);
                currentCompositeKeyHash = ComposablesKt.getCurrentCompositeKeyHash(composerStartRestartGroup, 0);
                CompositionLocalMap currentCompositionLocalMap2 = composerStartRestartGroup.getCurrentCompositionLocalMap();
                InterfaceC2255s interfaceC2255sC2 = AbstractC2237a.c(composerStartRestartGroup, interfaceC2255sBackground2);
                if (composerStartRestartGroup.getApplier() == null) {
                    ComposablesKt.invalidApplier();
                }
                composerStartRestartGroup.startReusableNode();
                if (composerStartRestartGroup.getInserting()) {
                    composerStartRestartGroup.useNode();
                } else {
                    composerStartRestartGroup.createNode(c0291f);
                }
                composerD = AbstractC2761L.d(composerStartRestartGroup, interfaceC0245a0D2, c0289e, currentCompositionLocalMap2, c0289e2);
                if (!composerD.getInserting() || !o.c(composerD.rememberedValue(), Integer.valueOf(currentCompositeKeyHash))) {
                    Z0.o.u(currentCompositeKeyHash, composerD, currentCompositeKeyHash, c0289e3);
                }
                Updater.m89setimpl(composerD, interfaceC2255sC2, c0289e4);
                composerStartRestartGroup.startReplaceGroup(-1860834223);
                if (eVar == null) {
                    eVar2 = eVar;
                    CompositionLocalKt.CompositionLocalProvider((ProvidedValue<?>) Q.f9592a.provides(new C2714u(switchColors.m888iconColorWaAFU9c$revenuecatui_defaultsBc8Release(z7, z6))), eVar2, composerStartRestartGroup, ProvidedValue.$stable | ((i8 >> 9) & 112));
                } else {
                    eVar2 = eVar;
                }
                composerStartRestartGroup.endReplaceGroup();
                composerStartRestartGroup.endNode();
                composerStartRestartGroup.endNode();
                if (ComposerKt.isTraceInProgress()) {
                    ComposerKt.traceEventEnd();
                }
            }
            Z0.o.u(currentCompositeKeyHash2, composerM81constructorimpl, currentCompositeKeyHash2, c0289e3);
            C0289e c0289e42 = C0293g.f2377d;
            Updater.m89setimpl(composerM81constructorimpl, interfaceC2255sC, c0289e42);
            InterfaceC2255s interfaceC2255sBackground22 = BackgroundKt.background(AbstractC3044q0.a(C0094x.f393a.align(C2252p.f18820a, C2239c.f18797d).then(new ThumbElement(kVar, z6)), kVar, Z0.a(switchTokens.m892getStateLayerSizeD9Ej5fM() / 2, 4, false)), colorStyleThumbColor$revenuecatui_defaultsBc8Release, x6);
            InterfaceC0245a0 interfaceC0245a0D22 = AbstractC0084s.d(C2239c.f18798e, false);
            currentCompositeKeyHash = ComposablesKt.getCurrentCompositeKeyHash(composerStartRestartGroup, 0);
            CompositionLocalMap currentCompositionLocalMap22 = composerStartRestartGroup.getCurrentCompositionLocalMap();
            InterfaceC2255s interfaceC2255sC22 = AbstractC2237a.c(composerStartRestartGroup, interfaceC2255sBackground22);
            if (composerStartRestartGroup.getApplier() == null) {
            }
            composerStartRestartGroup.startReusableNode();
            if (composerStartRestartGroup.getInserting()) {
            }
            composerD = AbstractC2761L.d(composerStartRestartGroup, interfaceC0245a0D22, c0289e, currentCompositionLocalMap22, c0289e2);
            if (!composerD.getInserting()) {
                Z0.o.u(currentCompositeKeyHash, composerD, currentCompositeKeyHash, c0289e3);
                Updater.m89setimpl(composerD, interfaceC2255sC22, c0289e42);
                composerStartRestartGroup.startReplaceGroup(-1860834223);
                if (eVar == null) {
                }
                composerStartRestartGroup.endReplaceGroup();
                composerStartRestartGroup.endNode();
                composerStartRestartGroup.endNode();
                if (ComposerKt.isTraceInProgress()) {
                }
            }
        }
        ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composerStartRestartGroup.endRestartGroup();
        if (scopeUpdateScopeEndRestartGroup != null) {
            scopeUpdateScopeEndRestartGroup.updateScope(new AnonymousClass2(interfaceC2255s, z6, z7, switchColors, eVar2, kVar, x6, i6));
        }
    }

    private static final X fromToken(C0910j1 c0910j1, ShapeKeyTokens shapeKeyTokens) {
        if (WhenMappings.$EnumSwitchMapping$0[shapeKeyTokens.ordinal()] == 1) {
            return g.f2694a;
        }
        throw new v();
    }

    @Composable
    @ReadOnlyComposable
    private static final X getValue(ShapeKeyTokens shapeKeyTokens, Composer composer, int i6) {
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(2130513227, i6, -1, "com.revenuecat.purchases.ui.revenuecatui.composables.<get-value> (Switch.kt:464)");
        }
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(419509830, 0, -1, "androidx.compose.material3.MaterialTheme.<get-shapes> (MaterialTheme.kt:137)");
        }
        C0910j1 c0910j1 = (C0910j1) composer.consume(AbstractC0913k1.f10010a);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        X xFromToken = fromToken(c0910j1, shapeKeyTokens);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        return xFromToken;
    }

    @Stable
    private static final long fromToken(I i6, ColorSchemeKeyTokens colorSchemeKeyTokens) {
        switch (WhenMappings.$EnumSwitchMapping$1[colorSchemeKeyTokens.ordinal()]) {
            case 1:
                return i6.f9410b;
            case 2:
                return i6.f9414d;
            case 3:
                return i6.f9427q;
            case 4:
                return i6.f9384A;
            case 5:
                return i6.f9408a;
            case 6:
                return i6.f9426p;
            case 7:
                return i6.f9391H;
            default:
                throw new v();
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    @Composable
    @ReadOnlyComposable
    public static final long getValue(ColorSchemeKeyTokens colorSchemeKeyTokens, Composer composer, int i6) {
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-323273324, i6, -1, "com.revenuecat.purchases.ui.revenuecatui.composables.<get-value> (Switch.kt:468)");
        }
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-561618718, 0, -1, "androidx.compose.material3.MaterialTheme.<get-colorScheme> (MaterialTheme.kt:121)");
        }
        I i7 = (I) composer.consume(J.f9438a);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        long jFromToken = fromToken(i7, colorSchemeKeyTokens);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        return jFromToken;
    }
}
