package com.revenuecat.purchases.ui.revenuecatui.activity;

import A0.a;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.compose.runtime.internal.StabilityInferred;
import com.revenuecat.purchases.ui.revenuecatui.CustomVariableValue;
import com.revenuecat.purchases.ui.revenuecatui.OfferingSelection;
import com.revenuecat.purchases.ui.revenuecatui.fonts.ParcelizableFontProvider;
import com.revenuecat.purchases.ui.revenuecatui.fonts.PaywallFontFamily;
import com.revenuecat.purchases.ui.revenuecatui.fonts.TypographyType;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import x4.AbstractC3229F;
import x4.z;

/* JADX INFO: loaded from: classes3.dex */
@StabilityInferred(parameters = 0)
public final class PaywallActivityArgs implements Parcelable {
    public static final int $stable = 8;
    public static final Parcelable.Creator<PaywallActivityArgs> CREATOR = new Creator();
    private final Map<String, CustomVariableValue> customVariables;
    private final boolean edgeToEdge;
    private final Map<TypographyType, PaywallFontFamily> fonts;
    private final Integer nonSerializableArgsKey;
    private final OfferingSelection.IdAndPresentedOfferingContext offeringIdAndPresentedOfferingContext;
    private final String requiredEntitlementIdentifier;
    private final boolean shouldDisplayDismissButton;
    private final boolean wasLaunchedThroughSDK;

    public static final class Creator implements Parcelable.Creator<PaywallActivityArgs> {
        /* JADX WARN: Can't rename method to resolve collision */
        /* JADX WARN: Multi-variable type inference failed */
        @Override // android.os.Parcelable.Creator
        public final PaywallActivityArgs createFromParcel(Parcel parcel) {
            LinkedHashMap linkedHashMap;
            int i6;
            LinkedHashMap linkedHashMap2;
            boolean z6;
            boolean z7;
            o.h(parcel, "parcel");
            String string = parcel.readString();
            OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContextCreateFromParcel = parcel.readInt() == 0 ? null : OfferingSelection.IdAndPresentedOfferingContext.CREATOR.createFromParcel(parcel);
            if (parcel.readInt() == 0) {
                linkedHashMap = null;
            } else {
                int i7 = parcel.readInt();
                linkedHashMap = new LinkedHashMap(i7);
                for (int i8 = 0; i8 != i7; i8++) {
                    linkedHashMap.put(TypographyType.valueOf(parcel.readString()), parcel.readInt() == 0 ? null : PaywallFontFamily.CREATOR.createFromParcel(parcel));
                }
            }
            boolean z8 = 1;
            if (parcel.readInt() != 0) {
                i6 = 0;
                linkedHashMap2 = linkedHashMap;
                z6 = true;
            } else {
                i6 = 0;
                linkedHashMap2 = linkedHashMap;
                z6 = false;
            }
            if (parcel.readInt() != 0) {
                z7 = true;
            } else {
                z7 = true;
                z8 = i6;
            }
            boolean z9 = z7;
            if (parcel.readInt() == 0) {
                z9 = i6;
            }
            int i9 = parcel.readInt();
            LinkedHashMap linkedHashMap3 = new LinkedHashMap(i9);
            while (i6 != i9) {
                linkedHashMap3.put(parcel.readString(), parcel.readParcelable(PaywallActivityArgs.class.getClassLoader()));
                i6++;
            }
            return new PaywallActivityArgs(string, idAndPresentedOfferingContextCreateFromParcel, linkedHashMap2, z6, z8, z9, linkedHashMap3, parcel.readInt() != 0 ? Integer.valueOf(parcel.readInt()) : null);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        public final PaywallActivityArgs[] newArray(int i6) {
            return new PaywallActivityArgs[i6];
        }
    }

    public PaywallActivityArgs() {
        this((String) null, (OfferingSelection.IdAndPresentedOfferingContext) null, (Map) null, false, false, false, (Map) null, (Integer) null, 255, (h) null);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ PaywallActivityArgs copy$default(PaywallActivityArgs paywallActivityArgs, String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, Map map, boolean z6, boolean z7, boolean z8, Map map2, Integer num, int i6, Object obj) {
        if ((i6 & 1) != 0) {
            str = paywallActivityArgs.requiredEntitlementIdentifier;
        }
        if ((i6 & 2) != 0) {
            idAndPresentedOfferingContext = paywallActivityArgs.offeringIdAndPresentedOfferingContext;
        }
        if ((i6 & 4) != 0) {
            map = paywallActivityArgs.fonts;
        }
        if ((i6 & 8) != 0) {
            z6 = paywallActivityArgs.shouldDisplayDismissButton;
        }
        if ((i6 & 16) != 0) {
            z7 = paywallActivityArgs.edgeToEdge;
        }
        if ((i6 & 32) != 0) {
            z8 = paywallActivityArgs.wasLaunchedThroughSDK;
        }
        if ((i6 & 64) != 0) {
            map2 = paywallActivityArgs.customVariables;
        }
        if ((i6 & 128) != 0) {
            num = paywallActivityArgs.nonSerializableArgsKey;
        }
        Map map3 = map2;
        Integer num2 = num;
        boolean z9 = z7;
        boolean z10 = z8;
        return paywallActivityArgs.copy(str, idAndPresentedOfferingContext, map, z6, z9, z10, map3, num2);
    }

    public final String component1() {
        return this.requiredEntitlementIdentifier;
    }

    public final OfferingSelection.IdAndPresentedOfferingContext component2() {
        return this.offeringIdAndPresentedOfferingContext;
    }

    public final Map<TypographyType, PaywallFontFamily> component3() {
        return this.fonts;
    }

    public final boolean component4() {
        return this.shouldDisplayDismissButton;
    }

    public final boolean component5() {
        return this.edgeToEdge;
    }

    public final boolean component6() {
        return this.wasLaunchedThroughSDK;
    }

    public final Map<String, CustomVariableValue> component7() {
        return this.customVariables;
    }

    public final Integer component8() {
        return this.nonSerializableArgsKey;
    }

    public final PaywallActivityArgs copy(String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, Map<TypographyType, PaywallFontFamily> map, boolean z6, boolean z7, boolean z8, Map<String, ? extends CustomVariableValue> customVariables, Integer num) {
        o.h(customVariables, "customVariables");
        return new PaywallActivityArgs(str, idAndPresentedOfferingContext, map, z6, z7, z8, customVariables, num);
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof PaywallActivityArgs)) {
            return false;
        }
        PaywallActivityArgs paywallActivityArgs = (PaywallActivityArgs) obj;
        return o.c(this.requiredEntitlementIdentifier, paywallActivityArgs.requiredEntitlementIdentifier) && o.c(this.offeringIdAndPresentedOfferingContext, paywallActivityArgs.offeringIdAndPresentedOfferingContext) && o.c(this.fonts, paywallActivityArgs.fonts) && this.shouldDisplayDismissButton == paywallActivityArgs.shouldDisplayDismissButton && this.edgeToEdge == paywallActivityArgs.edgeToEdge && this.wasLaunchedThroughSDK == paywallActivityArgs.wasLaunchedThroughSDK && o.c(this.customVariables, paywallActivityArgs.customVariables) && o.c(this.nonSerializableArgsKey, paywallActivityArgs.nonSerializableArgsKey);
    }

    public final Map<String, CustomVariableValue> getCustomVariables() {
        return this.customVariables;
    }

    public final boolean getEdgeToEdge() {
        return this.edgeToEdge;
    }

    public final Map<TypographyType, PaywallFontFamily> getFonts() {
        return this.fonts;
    }

    public final Integer getNonSerializableArgsKey() {
        return this.nonSerializableArgsKey;
    }

    public final OfferingSelection.IdAndPresentedOfferingContext getOfferingIdAndPresentedOfferingContext() {
        return this.offeringIdAndPresentedOfferingContext;
    }

    public final String getRequiredEntitlementIdentifier() {
        return this.requiredEntitlementIdentifier;
    }

    public final boolean getShouldDisplayDismissButton() {
        return this.shouldDisplayDismissButton;
    }

    public final boolean getWasLaunchedThroughSDK() {
        return this.wasLaunchedThroughSDK;
    }

    public int hashCode() {
        String str = this.requiredEntitlementIdentifier;
        int iHashCode = (str == null ? 0 : str.hashCode()) * 31;
        OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext = this.offeringIdAndPresentedOfferingContext;
        int iHashCode2 = (iHashCode + (idAndPresentedOfferingContext == null ? 0 : idAndPresentedOfferingContext.hashCode())) * 31;
        Map<TypographyType, PaywallFontFamily> map = this.fonts;
        int iD = a.d(this.customVariables, com.google.android.recaptcha.internal.a.f(com.google.android.recaptcha.internal.a.f(com.google.android.recaptcha.internal.a.f((iHashCode2 + (map == null ? 0 : map.hashCode())) * 31, 31, this.shouldDisplayDismissButton), 31, this.edgeToEdge), 31, this.wasLaunchedThroughSDK), 31);
        Integer num = this.nonSerializableArgsKey;
        return iD + (num != null ? num.hashCode() : 0);
    }

    public String toString() {
        return "PaywallActivityArgs(requiredEntitlementIdentifier=" + this.requiredEntitlementIdentifier + ", offeringIdAndPresentedOfferingContext=" + this.offeringIdAndPresentedOfferingContext + ", fonts=" + this.fonts + ", shouldDisplayDismissButton=" + this.shouldDisplayDismissButton + ", edgeToEdge=" + this.edgeToEdge + ", wasLaunchedThroughSDK=" + this.wasLaunchedThroughSDK + ", customVariables=" + this.customVariables + ", nonSerializableArgsKey=" + this.nonSerializableArgsKey + ')';
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel out, int i6) {
        o.h(out, "out");
        out.writeString(this.requiredEntitlementIdentifier);
        OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext = this.offeringIdAndPresentedOfferingContext;
        if (idAndPresentedOfferingContext == null) {
            out.writeInt(0);
        } else {
            out.writeInt(1);
            idAndPresentedOfferingContext.writeToParcel(out, i6);
        }
        Map<TypographyType, PaywallFontFamily> map = this.fonts;
        if (map == null) {
            out.writeInt(0);
        } else {
            out.writeInt(1);
            out.writeInt(map.size());
            for (Map.Entry<TypographyType, PaywallFontFamily> entry : map.entrySet()) {
                out.writeString(entry.getKey().name());
                PaywallFontFamily value = entry.getValue();
                if (value == null) {
                    out.writeInt(0);
                } else {
                    out.writeInt(1);
                    value.writeToParcel(out, i6);
                }
            }
        }
        out.writeInt(this.shouldDisplayDismissButton ? 1 : 0);
        out.writeInt(this.edgeToEdge ? 1 : 0);
        out.writeInt(this.wasLaunchedThroughSDK ? 1 : 0);
        Map<String, CustomVariableValue> map2 = this.customVariables;
        out.writeInt(map2.size());
        for (Map.Entry<String, CustomVariableValue> entry2 : map2.entrySet()) {
            out.writeString(entry2.getKey());
            out.writeParcelable(entry2.getValue(), i6);
        }
        Integer num = this.nonSerializableArgsKey;
        if (num == null) {
            out.writeInt(0);
        } else {
            out.writeInt(1);
            out.writeInt(num.intValue());
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    public PaywallActivityArgs(String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, Map<TypographyType, PaywallFontFamily> map, boolean z6, boolean z7, boolean z8, Map<String, ? extends CustomVariableValue> customVariables, Integer num) {
        o.h(customVariables, "customVariables");
        this.requiredEntitlementIdentifier = str;
        this.offeringIdAndPresentedOfferingContext = idAndPresentedOfferingContext;
        this.fonts = map;
        this.shouldDisplayDismissButton = z6;
        this.edgeToEdge = z7;
        this.wasLaunchedThroughSDK = z8;
        this.customVariables = customVariables;
        this.nonSerializableArgsKey = num;
    }

    public /* synthetic */ PaywallActivityArgs(String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, Map map, boolean z6, boolean z7, boolean z8, Map map2, Integer num, int i6, h hVar) {
        this((i6 & 1) != 0 ? null : str, (i6 & 2) != 0 ? null : idAndPresentedOfferingContext, (Map<TypographyType, PaywallFontFamily>) ((i6 & 4) != 0 ? null : map), (i6 & 8) != 0 ? true : z6, (i6 & 16) != 0 ? PaywallActivityArgsKt.getDefaultEdgeToEdge() : z7, (i6 & 32) != 0 ? true : z8, (Map<String, ? extends CustomVariableValue>) ((i6 & 64) != 0 ? z.f26066a : map2), (i6 & 128) != 0 ? null : num);
    }

    public /* synthetic */ PaywallActivityArgs(String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, ParcelizableFontProvider parcelizableFontProvider, boolean z6, boolean z7, boolean z8, Map map, Integer num, int i6, h hVar) {
        this((i6 & 1) != 0 ? null : str, (i6 & 2) != 0 ? null : idAndPresentedOfferingContext, parcelizableFontProvider, (i6 & 8) != 0 ? true : z6, (i6 & 16) != 0 ? PaywallActivityArgsKt.getDefaultEdgeToEdge() : z7, (i6 & 32) != 0 ? true : z8, (Map<String, ? extends CustomVariableValue>) ((i6 & 64) != 0 ? z.f26066a : map), (i6 & 128) != 0 ? null : num);
    }

    public PaywallActivityArgs(String str, OfferingSelection.IdAndPresentedOfferingContext idAndPresentedOfferingContext, ParcelizableFontProvider parcelizableFontProvider, boolean z6, boolean z7, boolean z8, Map<String, ? extends CustomVariableValue> customVariables, Integer num) {
        LinkedHashMap linkedHashMap;
        o.h(customVariables, "customVariables");
        if (parcelizableFontProvider != null) {
            TypographyType[] typographyTypeArrValues = TypographyType.values();
            int iU = AbstractC3229F.u(typographyTypeArrValues.length);
            linkedHashMap = new LinkedHashMap(iU < 16 ? 16 : iU);
            for (TypographyType typographyType : typographyTypeArrValues) {
                linkedHashMap.put(typographyType, parcelizableFontProvider.getFont(typographyType));
            }
        } else {
            linkedHashMap = null;
        }
        this(str, idAndPresentedOfferingContext, linkedHashMap, z6, z7, z8, customVariables, num);
    }
}
