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

import J4.a;
import com.revenuecat.purchases.ui.revenuecatui.components.timeline.TimelineComponentState;
import com.revenuecat.purchases.ui.revenuecatui.extensions.SizeConstraintExtensionsKt;
import h1.f;
import java.util.Iterator;
import kotlin.jvm.internal.p;

/* JADX INFO: loaded from: classes3.dex */
public final class TimelineComponentViewKt$TimelineComponentView$2$biggestIconWidth$2$1 extends p implements a {
    final /* synthetic */ TimelineComponentState $timelineState;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public TimelineComponentViewKt$TimelineComponentView$2$biggestIconWidth$2$1(TimelineComponentState timelineComponentState) {
        super(0);
        this.$timelineState = timelineComponentState;
    }

    @Override // J4.a
    /* JADX INFO: renamed from: invoke-lTKBWiU, reason: not valid java name and merged with bridge method [inline-methods] */
    public final f invoke() {
        Iterator it = this.$timelineState.getItems().iterator();
        if (!it.hasNext()) {
            return null;
        }
        f fVarDpOrNull = SizeConstraintExtensionsKt.dpOrNull(((TimelineComponentState.ItemState) it.next()).getIcon().getSize().getWidth());
        f fVar = new f(fVarDpOrNull != null ? fVarDpOrNull.f16618a : 0);
        while (it.hasNext()) {
            f fVarDpOrNull2 = SizeConstraintExtensionsKt.dpOrNull(((TimelineComponentState.ItemState) it.next()).getIcon().getSize().getWidth());
            f fVar2 = new f(fVarDpOrNull2 != null ? fVarDpOrNull2.f16618a : 0);
            if (fVar.compareTo(fVar2) < 0) {
                fVar = fVar2;
            }
        }
        return fVar;
    }
}
