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

import androidx.compose.runtime.Composable;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.State;
import com.revenuecat.purchases.ui.revenuecatui.UIConstant;
import com.revenuecat.purchases.ui.revenuecatui.data.PaywallState;
import com.revenuecat.purchases.ui.revenuecatui.data.PaywallViewModel;
import com.revenuecat.purchases.ui.revenuecatui.data.processed.TemplateConfiguration;
import kotlin.jvm.internal.o;
import p.f0;
import p0.C2714u;
import q.AbstractC2777h;

/* JADX INFO: loaded from: classes3.dex */
public final class AnimationsKt {
    @Composable
    public static final float packageButtonActionInProgressOpacityAnimation(PaywallViewModel paywallViewModel, Composer composer, int i6) {
        o.h(paywallViewModel, "<this>");
        composer.startReplaceGroup(-1704661559);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(-1704661559, i6, -1, "com.revenuecat.purchases.ui.revenuecatui.extensions.packageButtonActionInProgressOpacityAnimation (Animations.kt:13)");
        }
        float fPackageButtonActionInProgressOpacityAnimation$lambda$0 = packageButtonActionInProgressOpacityAnimation$lambda$0(AbstractC2777h.b(paywallViewModel.getActionInProgress().getValue().booleanValue() ? 0.4f : 1.0f, UIConstant.INSTANCE.defaultAnimation(), "Package button action in progress alpha", null, composer, 3072, 20));
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        composer.endReplaceGroup();
        return fPackageButtonActionInProgressOpacityAnimation$lambda$0;
    }

    private static final float packageButtonActionInProgressOpacityAnimation$lambda$0(State<Float> state) {
        return state.getValue().floatValue();
    }

    @Composable
    /* JADX INFO: renamed from: packageButtonColorAnimation-9z6LAg8, reason: not valid java name */
    public static final long m1113packageButtonColorAnimation9z6LAg8(PaywallState.Loaded.Legacy packageButtonColorAnimation, TemplateConfiguration.PackageInfo packageInfo, long j4, long j6, Composer composer, int i6) {
        o.h(packageButtonColorAnimation, "$this$packageButtonColorAnimation");
        o.h(packageInfo, "packageInfo");
        composer.startReplaceGroup(792231715);
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventStart(792231715, i6, -1, "com.revenuecat.purchases.ui.revenuecatui.extensions.packageButtonColorAnimation (Animations.kt:28)");
        }
        if (!packageInfo.equals(packageButtonColorAnimation.getSelectedPackage().getValue())) {
            j4 = j6;
        }
        long jPackageButtonColorAnimation_9z6LAg8$lambda$1 = packageButtonColorAnimation_9z6LAg8$lambda$1(f0.a(j4, UIConstant.INSTANCE.defaultAnimation(), "Package button selected color: " + packageInfo.getRcPackage().getIdentifier(), composer, 0, 8));
        if (ComposerKt.isTraceInProgress()) {
            ComposerKt.traceEventEnd();
        }
        composer.endReplaceGroup();
        return jPackageButtonColorAnimation_9z6LAg8$lambda$1;
    }

    private static final long packageButtonColorAnimation_9z6LAg8$lambda$1(State<C2714u> state) {
        return state.getValue().f22947a;
    }
}
