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

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.properties.Size;
import com.revenuecat.purchases.ui.revenuecatui.CustomVariableValue;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedTabsPartial;
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.style.TabsComponentStyle;
import com.revenuecat.purchases.ui.revenuecatui.composables.OfferEligibility;
import com.revenuecat.purchases.ui.revenuecatui.helpers.NonEmptyList;
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 TabsComponentState {
    public static final int $stable = 0;
    private final State background$delegate;
    private final State border$delegate;
    private final a customVariablesProvider;
    private final State margin$delegate;
    private final State offerEligibility$delegate;
    private final State padding$delegate;
    private final State presentedPartial$delegate;
    private final a selectedPackageInfoProvider;
    private final State shadow$delegate;
    private final State shape$delegate;
    private final State size$delegate;
    private final TabsComponentStyle style;
    private final NonEmptyList<TabsComponentStyle.Tab> tabs;
    private final State visible$delegate;
    private final MutableState windowSize$delegate;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.components.tabs.TabsComponentState$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 TabsComponentState(c initialWindowSize, TabsComponentStyle style, a selectedPackageInfoProvider, a customVariablesProvider) {
        o.h(initialWindowSize, "initialWindowSize");
        o.h(style, "style");
        o.h(selectedPackageInfoProvider, "selectedPackageInfoProvider");
        o.h(customVariablesProvider, "customVariablesProvider");
        this.style = style;
        this.selectedPackageInfoProvider = selectedPackageInfoProvider;
        this.customVariablesProvider = customVariablesProvider;
        this.windowSize$delegate = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(initialWindowSize, null, 2, null);
        this.offerEligibility$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$offerEligibility$2(this));
        this.presentedPartial$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$presentedPartial$2(this));
        this.visible$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$visible$2(this));
        this.tabs = style.getTabs();
        this.size$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$size$2(this));
        this.background$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$background$2(this));
        this.padding$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$padding$2(this));
        this.margin$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$margin$2(this));
        this.shape$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$shape$2(this));
        this.border$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$border$2(this));
        this.shadow$delegate = SnapshotStateKt.derivedStateOf(new TabsComponentState$shadow$2(this));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final OfferEligibility getOfferEligibility() {
        return (OfferEligibility) this.offerEligibility$delegate.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final PresentedTabsPartial getPresentedPartial() {
        return (PresentedTabsPartial) 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(TabsComponentState tabsComponentState, c cVar, int i6, Object obj) {
        if ((i6 & 1) != 0) {
            cVar = null;
        }
        tabsComponentState.update(cVar);
    }

    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 */ H0 getMargin() {
        return (H0) this.margin$delegate.getValue();
    }

    public final /* synthetic */ H0 getPadding() {
        return (H0) this.padding$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 */ NonEmptyList getTabs() {
        return this.tabs;
    }

    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 */ TabsComponentState(c cVar, TabsComponentStyle tabsComponentStyle, a aVar, a aVar2, int i6, h hVar) {
        this(cVar, tabsComponentStyle, aVar, (i6 & 8) != 0 ? AnonymousClass1.INSTANCE : aVar2);
    }
}
