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

import J4.a;
import com.revenuecat.purchases.paywalls.components.PartialCarouselComponent;
import com.revenuecat.purchases.paywalls.components.properties.VerticalAlignment;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedCarouselPartial;
import com.revenuecat.purchases.ui.revenuecatui.components.ktx.AlignmentKt;
import i0.InterfaceC2241e;
import kotlin.jvm.internal.p;

/* JADX INFO: loaded from: classes3.dex */
public final class CarouselComponentState$pageAlignment$2 extends p implements a {
    final /* synthetic */ CarouselComponentState this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public CarouselComponentState$pageAlignment$2(CarouselComponentState carouselComponentState) {
        super(0);
        this.this$0 = carouselComponentState;
    }

    @Override // J4.a
    public final InterfaceC2241e invoke() {
        PartialCarouselComponent partial;
        VerticalAlignment pageAlignment;
        InterfaceC2241e alignment;
        PresentedCarouselPartial presentedPartial = this.this$0.getPresentedPartial();
        return (presentedPartial == null || (partial = presentedPartial.getPartial()) == null || (pageAlignment = partial.getPageAlignment()) == null || (alignment = AlignmentKt.toAlignment(pageAlignment)) == null) ? this.this$0.style.getPageAlignment() : alignment;
    }
}
