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

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.IconComponent;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.ui.revenuecatui.CustomVariableValue;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedIconPartial;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BorderStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.ColorStyles;
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.IconComponentStyle;
import h1.m;
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 IconComponentState {
    public static final int $stable = 0;
    private final State backgroundColorStyles$delegate;
    private final State baseUrl$delegate;
    private final State border$delegate;
    private final a customVariablesProvider;
    private final State formats$delegate;
    private final State iconBackground$delegate;
    private final State iconName$delegate;
    private final MutableState layoutDirection$delegate;
    private final State margin$delegate;
    private final PackageAwareDelegate packageAwareDelegate;
    private final State padding$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 State sizePlusMargin$delegate;
    private final IconComponentStyle style;
    private final State tintColor$delegate;
    private final State url$delegate;
    private final State visible$delegate;
    private final MutableState windowSize$delegate;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.components.iconcomponent.IconComponentState$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 IconComponentState(c initialWindowSize, m initialLayoutDirection, IconComponentStyle style, a selectedPackageInfoProvider, a selectedTabIndexProvider, a selectedOfferEligibilityProvider, a customVariablesProvider) {
        o.h(initialWindowSize, "initialWindowSize");
        o.h(initialLayoutDirection, "initialLayoutDirection");
        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.layoutDirection$delegate = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(initialLayoutDirection, null, 2, null);
        this.packageAwareDelegate = new PackageAwareDelegate(style, selectedPackageInfoProvider, selectedTabIndexProvider, selectedOfferEligibilityProvider);
        this.presentedPartial$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$presentedPartial$2(this));
        this.baseUrl$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$baseUrl$2(this));
        this.iconName$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$iconName$2(this));
        this.formats$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$formats$2(this));
        this.iconBackground$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$iconBackground$2(this));
        this.visible$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$visible$2(this));
        this.url$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$url$2(this));
        this.size$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$size$2(this));
        this.padding$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$padding$2(this));
        this.margin$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$margin$2(this));
        this.sizePlusMargin$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$sizePlusMargin$2(this));
        this.shape$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$shape$2(this));
        this.border$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$border$2(this));
        this.shadow$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$shadow$2(this));
        this.backgroundColorStyles$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$backgroundColorStyles$2(this));
        this.tintColor$delegate = SnapshotStateKt.derivedStateOf(new IconComponentState$tintColor$2(this));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final String getBaseUrl() {
        return (String) this.baseUrl$delegate.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final IconComponent.Formats getFormats() {
        return (IconComponent.Formats) this.formats$delegate.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final IconComponentStyle.Background getIconBackground() {
        return (IconComponentStyle.Background) this.iconBackground$delegate.getValue();
    }

    private final String getIconName() {
        return (String) this.iconName$delegate.getValue();
    }

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

    /* JADX INFO: Access modifiers changed from: private */
    public final PresentedIconPartial getPresentedPartial() {
        return (PresentedIconPartial) 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 setLayoutDirection(m mVar) {
        this.layoutDirection$delegate.setValue(mVar);
    }

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

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

    public final /* synthetic */ ColorStyles getBackgroundColorStyles() {
        return (ColorStyles) this.backgroundColorStyles$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 */ Size getSizePlusMargin() {
        return (Size) this.sizePlusMargin$delegate.getValue();
    }

    public final ColorStyles getTintColor() {
        return (ColorStyles) this.tintColor$delegate.getValue();
    }

    public final /* synthetic */ String getUrl() {
        return (String) this.url$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 */ IconComponentState(c cVar, m mVar, IconComponentStyle iconComponentStyle, a aVar, a aVar2, a aVar3, a aVar4, int i6, h hVar) {
        this(cVar, mVar, iconComponentStyle, aVar, aVar2, aVar3, (i6 & 64) != 0 ? AnonymousClass1.INSTANCE : aVar4);
    }
}
