package com.revenuecat.purchases.ui.revenuecatui.components.timeline;

import J4.c;
import androidx.compose.runtime.State;
import com.revenuecat.purchases.paywalls.components.TimelineComponent;
import h1.f;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import m1.b;
import m1.d;
import m1.e;
import m1.m;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final class TimelineComponentViewKt$TimelineComponentView$2$2$1 extends p implements c {
    final /* synthetic */ State<f> $biggestIconWidth$delegate;
    final /* synthetic */ e $currentPreviousItem;
    final /* synthetic */ m1.c $descriptionRef;
    final /* synthetic */ TimelineComponentState $timelineState;
    final /* synthetic */ m1.c $titleRef;

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

        static {
            int[] iArr = new int[TimelineComponent.IconAlignment.values().length];
            try {
                iArr[TimelineComponent.IconAlignment.Title.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[TimelineComponent.IconAlignment.TitleAndDescription.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            $EnumSwitchMapping$0 = iArr;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public TimelineComponentViewKt$TimelineComponentView$2$2$1(TimelineComponentState timelineComponentState, e eVar, m1.c cVar, m1.c cVar2, State<f> state) {
        super(1);
        this.$timelineState = timelineComponentState;
        this.$currentPreviousItem = eVar;
        this.$titleRef = cVar;
        this.$descriptionRef = cVar2;
        this.$biggestIconWidth$delegate = state;
    }

    @Override // J4.c
    public /* bridge */ /* synthetic */ Object invoke(Object obj) {
        invoke((b) obj);
        return C3137A.f25453a;
    }

    public final void invoke(b constrainAs) {
        o.h(constrainAs, "$this$constrainAs");
        int i6 = WhenMappings.$EnumSwitchMapping$0[this.$timelineState.getIconAlignment().ordinal()];
        d dVar = constrainAs.f20410d;
        d dVar2 = constrainAs.f20411e;
        m1.c cVar = constrainAs.f20409c;
        if (i6 == 1) {
            e eVar = this.$currentPreviousItem;
            if (eVar == null) {
                eVar = cVar.f20418d;
            }
            d.b(dVar2, eVar, 0.0f, 6);
            d.c(dVar, cVar.f20417c, 0.0f, 6);
        } else if (i6 == 2) {
            d.b(dVar2, this.$titleRef.f20418d, 0.0f, 6);
            d.b(constrainAs.f20413g, this.$descriptionRef.f20420f, 0.0f, 6);
            d.c(dVar, cVar.f20417c, 0.0f, 6);
        }
        f fVarTimelineComponentView$lambda$13$lambda$1 = TimelineComponentViewKt.TimelineComponentView$lambda$13$lambda$1(this.$biggestIconWidth$delegate);
        constrainAs.f20414h.v(b.f20406j[0], fVarTimelineComponentView$lambda$13$lambda$1 != null ? new m(new f(fVarTimelineComponentView$lambda$13$lambda$1.f16618a), null) : new m(null, "wrap"));
    }
}
