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

import A2.c;
import B.H0;
import J4.a;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.Stable;
import androidx.compose.runtime.State;
import com.revenuecat.purchases.paywalls.components.CarouselComponent;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.ui.revenuecatui.CustomVariableValue;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedCarouselPartial;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BackgroundStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BorderStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ShadowStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.state.PackageAwareDelegate;
import com.revenuecat.purchases.ui.revenuecatui.components.style.CarouselComponentStyle;
import h1.f;
import i0.InterfaceC2241e;
import java.util.List;
import java.util.Map;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import p0.X;
import x4.z;

/* JADX INFO: loaded from: classes3.dex */
@Stable
public final class CarouselComponentState {
    public static final int $stable = 0;
    private final State autoAdvance$delegate;
    private final State background$delegate;
    private final State border$delegate;
    private final a customVariablesProvider;
    private final State initialPageIndex$delegate;
    private final State loop$delegate;
    private final State margin$delegate;
    private final PackageAwareDelegate packageAwareDelegate;
    private final State padding$delegate;
    private final State pageAlignment$delegate;
    private final State pageControl$delegate;
    private final State pagePeek$delegate;
    private final State pageSpacing$delegate;
    private final State pages$delegate;
    private final State presentedPartial$delegate;
    private final a selectedOfferEligibilityProvider;
    private final a selectedPackageInfoProvider;
    private final a selectedTabIndexProvider;
    private final State shadow$delegate;
    private final State shape$delegate;
    private final State size$delegate;
    private final CarouselComponentStyle style;
    private final State visible$delegate;
    private final MutableState windowSize$delegate;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.components.carousel.CarouselComponentState$1, reason: invalid class name */
    public static final class AnonymousClass1 extends p implements a {
        public static final AnonymousClass1 INSTANCE = new AnonymousClass1();

        public AnonymousClass1() {
            super(0);
        }

        @Override // J4.a
        public final Map<String, CustomVariableValue> invoke() {
            return z.f26066a;
        }
    }

    public CarouselComponentState(c initialWindowSize, CarouselComponentStyle style, a selectedPackageInfoProvider, a selectedTabIndexProvider, a selectedOfferEligibilityProvider, a customVariablesProvider) {
        o.h(initialWindowSize, "initialWindowSize");
        o.h(style, "style");
        o.h(selectedPackageInfoProvider, "selectedPackageInfoProvider");
        o.h(selectedTabIndexProvider, "selectedTabIndexProvider");
        o.h(selectedOfferEligibilityProvider, "selectedOfferEligibilityProvider");
        o.h(customVariablesProvider, "customVariablesProvider");
        this.style = style;
        this.selectedPackageInfoProvider = selectedPackageInfoProvider;
        this.selectedTabIndexProvider = selectedTabIndexProvider;
        this.selectedOfferEligibilityProvider = selectedOfferEligibilityProvider;
        this.customVariablesProvider = customVariablesProvider;
        this.windowSize$delegate = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(initialWindowSize, null, 2, null);
        this.packageAwareDelegate = new PackageAwareDelegate(style, selectedPackageInfoProvider, selectedTabIndexProvider, selectedOfferEligibilityProvider);
        this.presentedPartial$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$presentedPartial$2(this));
        this.visible$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$visible$2(this));
        this.initialPageIndex$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$initialPageIndex$2(this));
        this.pages$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$pages$2(this));
        this.pageAlignment$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$pageAlignment$2(this));
        this.size$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$size$2(this));
        this.pagePeek$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$pagePeek$2(this));
        this.background$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$background$2(this));
        this.pageSpacing$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$pageSpacing$2(this));
        this.padding$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$padding$2(this));
        this.margin$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$margin$2(this));
        this.shape$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$shape$2(this));
        this.border$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$border$2(this));
        this.shadow$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$shadow$2(this));
        this.pageControl$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$pageControl$2(this));
        this.loop$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$loop$2(this));
        this.autoAdvance$delegate = SnapshotStateKt.derivedStateOf(new CarouselComponentState$autoAdvance$2(this));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final PresentedCarouselPartial getPresentedPartial() {
        return (PresentedCarouselPartial) this.presentedPartial$delegate.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Multi-variable type inference failed */
    public final c getWindowSize() {
        return (c) this.windowSize$delegate.getValue();
    }

    private final void setWindowSize(c cVar) {
        this.windowSize$delegate.setValue(cVar);
    }

    public static /* synthetic */ void update$default(CarouselComponentState carouselComponentState, c cVar, int i6, Object obj) {
        if ((i6 & 1) != 0) {
            cVar = null;
        }
        carouselComponentState.update(cVar);
    }

    public final /* synthetic */ CarouselComponent.AutoAdvancePages getAutoAdvance() {
        return (CarouselComponent.AutoAdvancePages) this.autoAdvance$delegate.getValue();
    }

    public final /* synthetic */ BackgroundStyles getBackground() {
        return (BackgroundStyles) this.background$delegate.getValue();
    }

    public final /* synthetic */ BorderStyles getBorder() {
        return (BorderStyles) this.border$delegate.getValue();
    }

    public final /* synthetic */ int getInitialPageIndex() {
        return ((Number) this.initialPageIndex$delegate.getValue()).intValue();
    }

    public final /* synthetic */ boolean getLoop() {
        return ((Boolean) this.loop$delegate.getValue()).booleanValue();
    }

    public final /* synthetic */ H0 getMargin() {
        return (H0) this.margin$delegate.getValue();
    }

    public final /* synthetic */ H0 getPadding() {
        return (H0) this.padding$delegate.getValue();
    }

    public final /* synthetic */ InterfaceC2241e getPageAlignment() {
        return (InterfaceC2241e) this.pageAlignment$delegate.getValue();
    }

    public final /* synthetic */ CarouselComponentStyle.PageControlStyles getPageControl() {
        return (CarouselComponentStyle.PageControlStyles) this.pageControl$delegate.getValue();
    }

    /* JADX INFO: renamed from: getPagePeek-D9Ej5fM, reason: not valid java name */
    public final /* synthetic */ float m664getPagePeekD9Ej5fM() {
        return ((f) this.pagePeek$delegate.getValue()).f16618a;
    }

    /* JADX INFO: renamed from: getPageSpacing-D9Ej5fM, reason: not valid java name */
    public final /* synthetic */ float m665getPageSpacingD9Ej5fM() {
        return ((f) this.pageSpacing$delegate.getValue()).f16618a;
    }

    public final /* synthetic */ List getPages() {
        return (List) this.pages$delegate.getValue();
    }

    public final /* synthetic */ ShadowStyles getShadow() {
        return (ShadowStyles) this.shadow$delegate.getValue();
    }

    public final /* synthetic */ X getShape() {
        return (X) this.shape$delegate.getValue();
    }

    public final /* synthetic */ Size getSize() {
        return (Size) this.size$delegate.getValue();
    }

    public final /* synthetic */ boolean getVisible() {
        return ((Boolean) this.visible$delegate.getValue()).booleanValue();
    }

    public final /* synthetic */ void update(c cVar) {
        if (cVar != null) {
            setWindowSize(cVar);
        }
    }

    public /* synthetic */ CarouselComponentState(c cVar, CarouselComponentStyle carouselComponentStyle, a aVar, a aVar2, a aVar3, a aVar4, int i6, h hVar) {
        this(cVar, carouselComponentStyle, aVar, aVar2, aVar3, (i6 & 32) != 0 ? AnonymousClass1.INSTANCE : aVar4);
    }
}
