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

import J4.c;
import com.revenuecat.purchases.ui.revenuecatui.components.timeline.TimelineComponentState;
import h1.f;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import m1.b;
import m1.d;
import m1.m;
import w4.C3137A;
import w4.k;

/* JADX INFO: loaded from: classes3.dex */
public final class TimelineComponentViewKt$TimelineComponentView$2$6$1$1 extends p implements c {
    final /* synthetic */ m1.c $currentIconRef;
    final /* synthetic */ boolean $isLastItem;
    final /* synthetic */ TimelineComponentState.ItemState $item;
    final /* synthetic */ m1.c $nextIconRef;
    final /* synthetic */ float $nextItemIconHalfSize;
    final /* synthetic */ k $offsets;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public TimelineComponentViewKt$TimelineComponentView$2$6$1$1(k kVar, TimelineComponentState.ItemState itemState, m1.c cVar, boolean z6, m1.c cVar2, float f6) {
        super(1);
        this.$offsets = kVar;
        this.$item = itemState;
        this.$currentIconRef = cVar;
        this.$isLastItem = z6;
        this.$nextIconRef = cVar2;
        this.$nextItemIconHalfSize = f6;
    }

    @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");
        m1.c cVar = constrainAs.f20409c;
        d.c(constrainAs.f20410d, cVar.f20417c, ((f) this.$offsets.f25469a).f16618a, 4);
        m mVar = new m(new f(this.$item.getConnector() != null ? r1.getWidth() : 0), null);
        Q4.m[] mVarArr = b.f20406j;
        constrainAs.f20414h.v(mVarArr[0], mVar);
        d.b(constrainAs.f20411e, this.$currentIconRef.f20418d, 0.0f, 6);
        boolean z6 = this.$isLastItem;
        d dVar = constrainAs.f20413g;
        if (z6) {
            d.b(dVar, cVar.f20420f, ((f) this.$offsets.f25470b).f16618a, 4);
        } else {
            m1.c cVar2 = this.$nextIconRef;
            o.e(cVar2);
            d.b(dVar, cVar2.f20420f, this.$nextItemIconHalfSize + ((f) this.$offsets.f25470b).f16618a, 4);
        }
        constrainAs.f20415i.v(mVarArr[1], new m(null, "spread"));
    }
}
