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

import androidx.compose.runtime.internal.StabilityInferred;
import com.revenuecat.purchases.UiConfig;
import com.revenuecat.purchases.paywalls.PaywallData;
import com.revenuecat.purchases.paywalls.components.common.LocaleId;
import com.revenuecat.purchases.ui.revenuecatui.components.properties.BackgroundStyles;
import com.revenuecat.purchases.ui.revenuecatui.components.style.ComponentStyle;
import com.revenuecat.purchases.ui.revenuecatui.data.PaywallState;
import com.revenuecat.purchases.ui.revenuecatui.data.processed.PaywallTemplate;
import com.revenuecat.purchases.ui.revenuecatui.data.processed.VariableDataProvider;
import com.revenuecat.purchases.ui.revenuecatui.errors.PaywallValidationError;
import java.util.Set;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;

/* JADX INFO: loaded from: classes3.dex */
public interface PaywallValidationResult {

    @StabilityInferred(parameters = 0)
    public static final class Components implements PaywallValidationResult {
        public static final int $stable = 8;
        private final BackgroundStyles background;
        private final NonEmptyList<PaywallValidationError> errors;
        private final Integer initialSelectedTabIndex;
        private final NonEmptySet<LocaleId> locales;
        private final PaywallState.Loaded.Components.AvailablePackages packages;
        private final ComponentStyle stack;
        private final ComponentStyle stickyFooter;
        private final UiConfig.VariableConfig variableConfig;
        private final VariableDataProvider variableDataProvider;
        private final Set<String> zeroDecimalPlaceCountries;

        public Components(ComponentStyle stack, ComponentStyle componentStyle, BackgroundStyles background, NonEmptySet<LocaleId> locales, Set<String> zeroDecimalPlaceCountries, UiConfig.VariableConfig variableConfig, VariableDataProvider variableDataProvider, PaywallState.Loaded.Components.AvailablePackages packages, Integer num) {
            o.h(stack, "stack");
            o.h(background, "background");
            o.h(locales, "locales");
            o.h(zeroDecimalPlaceCountries, "zeroDecimalPlaceCountries");
            o.h(variableConfig, "variableConfig");
            o.h(variableDataProvider, "variableDataProvider");
            o.h(packages, "packages");
            this.stack = stack;
            this.stickyFooter = componentStyle;
            this.background = background;
            this.locales = locales;
            this.zeroDecimalPlaceCountries = zeroDecimalPlaceCountries;
            this.variableConfig = variableConfig;
            this.variableDataProvider = variableDataProvider;
            this.packages = packages;
            this.initialSelectedTabIndex = num;
        }

        /* JADX WARN: Multi-variable type inference failed */
        public static /* synthetic */ Components copy$default(Components components, ComponentStyle componentStyle, ComponentStyle componentStyle2, BackgroundStyles backgroundStyles, NonEmptySet nonEmptySet, Set set, UiConfig.VariableConfig variableConfig, VariableDataProvider variableDataProvider, PaywallState.Loaded.Components.AvailablePackages availablePackages, Integer num, int i6, Object obj) {
            if ((i6 & 1) != 0) {
                componentStyle = components.stack;
            }
            if ((i6 & 2) != 0) {
                componentStyle2 = components.stickyFooter;
            }
            if ((i6 & 4) != 0) {
                backgroundStyles = components.background;
            }
            if ((i6 & 8) != 0) {
                nonEmptySet = components.locales;
            }
            if ((i6 & 16) != 0) {
                set = components.zeroDecimalPlaceCountries;
            }
            if ((i6 & 32) != 0) {
                variableConfig = components.variableConfig;
            }
            if ((i6 & 64) != 0) {
                variableDataProvider = components.variableDataProvider;
            }
            if ((i6 & 128) != 0) {
                availablePackages = components.packages;
            }
            if ((i6 & 256) != 0) {
                num = components.initialSelectedTabIndex;
            }
            PaywallState.Loaded.Components.AvailablePackages availablePackages2 = availablePackages;
            Integer num2 = num;
            UiConfig.VariableConfig variableConfig2 = variableConfig;
            VariableDataProvider variableDataProvider2 = variableDataProvider;
            Set set2 = set;
            BackgroundStyles backgroundStyles2 = backgroundStyles;
            return components.copy(componentStyle, componentStyle2, backgroundStyles2, nonEmptySet, set2, variableConfig2, variableDataProvider2, availablePackages2, num2);
        }

        public final ComponentStyle component1() {
            return this.stack;
        }

        public final ComponentStyle component2() {
            return this.stickyFooter;
        }

        public final BackgroundStyles component3() {
            return this.background;
        }

        public final NonEmptySet<LocaleId> component4() {
            return this.locales;
        }

        public final Set<String> component5() {
            return this.zeroDecimalPlaceCountries;
        }

        public final UiConfig.VariableConfig component6() {
            return this.variableConfig;
        }

        public final VariableDataProvider component7() {
            return this.variableDataProvider;
        }

        public final PaywallState.Loaded.Components.AvailablePackages component8() {
            return this.packages;
        }

        public final Integer component9() {
            return this.initialSelectedTabIndex;
        }

        public final Components copy(ComponentStyle stack, ComponentStyle componentStyle, BackgroundStyles background, NonEmptySet<LocaleId> locales, Set<String> zeroDecimalPlaceCountries, UiConfig.VariableConfig variableConfig, VariableDataProvider variableDataProvider, PaywallState.Loaded.Components.AvailablePackages packages, Integer num) {
            o.h(stack, "stack");
            o.h(background, "background");
            o.h(locales, "locales");
            o.h(zeroDecimalPlaceCountries, "zeroDecimalPlaceCountries");
            o.h(variableConfig, "variableConfig");
            o.h(variableDataProvider, "variableDataProvider");
            o.h(packages, "packages");
            return new Components(stack, componentStyle, background, locales, zeroDecimalPlaceCountries, variableConfig, variableDataProvider, packages, num);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof Components)) {
                return false;
            }
            Components components = (Components) obj;
            return o.c(this.stack, components.stack) && o.c(this.stickyFooter, components.stickyFooter) && o.c(this.background, components.background) && o.c(this.locales, components.locales) && o.c(this.zeroDecimalPlaceCountries, components.zeroDecimalPlaceCountries) && o.c(this.variableConfig, components.variableConfig) && o.c(this.variableDataProvider, components.variableDataProvider) && o.c(this.packages, components.packages) && o.c(this.initialSelectedTabIndex, components.initialSelectedTabIndex);
        }

        public final BackgroundStyles getBackground() {
            return this.background;
        }

        @Override // com.revenuecat.purchases.ui.revenuecatui.helpers.PaywallValidationResult
        public NonEmptyList<PaywallValidationError> getErrors() {
            return this.errors;
        }

        public final Integer getInitialSelectedTabIndex() {
            return this.initialSelectedTabIndex;
        }

        public final NonEmptySet<LocaleId> getLocales() {
            return this.locales;
        }

        public final PaywallState.Loaded.Components.AvailablePackages getPackages() {
            return this.packages;
        }

        public final ComponentStyle getStack() {
            return this.stack;
        }

        public final ComponentStyle getStickyFooter() {
            return this.stickyFooter;
        }

        public final UiConfig.VariableConfig getVariableConfig() {
            return this.variableConfig;
        }

        public final VariableDataProvider getVariableDataProvider() {
            return this.variableDataProvider;
        }

        public final Set<String> getZeroDecimalPlaceCountries() {
            return this.zeroDecimalPlaceCountries;
        }

        public int hashCode() {
            int iHashCode = this.stack.hashCode() * 31;
            ComponentStyle componentStyle = this.stickyFooter;
            int iHashCode2 = (this.packages.hashCode() + ((this.variableDataProvider.hashCode() + ((this.variableConfig.hashCode() + ((this.zeroDecimalPlaceCountries.hashCode() + ((this.locales.hashCode() + ((this.background.hashCode() + ((iHashCode + (componentStyle == null ? 0 : componentStyle.hashCode())) * 31)) * 31)) * 31)) * 31)) * 31)) * 31)) * 31;
            Integer num = this.initialSelectedTabIndex;
            return iHashCode2 + (num != null ? num.hashCode() : 0);
        }

        public String toString() {
            return "Components(stack=" + this.stack + ", stickyFooter=" + this.stickyFooter + ", background=" + this.background + ", locales=" + this.locales + ", zeroDecimalPlaceCountries=" + this.zeroDecimalPlaceCountries + ", variableConfig=" + this.variableConfig + ", variableDataProvider=" + this.variableDataProvider + ", packages=" + this.packages + ", initialSelectedTabIndex=" + this.initialSelectedTabIndex + ')';
        }
    }

    NonEmptyList<PaywallValidationError> getErrors();

    @StabilityInferred(parameters = 0)
    public static final class Legacy implements PaywallValidationResult {
        public static final int $stable = 8;
        private final PaywallData displayablePaywall;
        private final NonEmptyList<PaywallValidationError> errors;
        private final PaywallTemplate template;

        /* JADX WARN: Multi-variable type inference failed */
        public Legacy(PaywallData displayablePaywall, PaywallTemplate template, NonEmptyList<? extends PaywallValidationError> nonEmptyList) {
            o.h(displayablePaywall, "displayablePaywall");
            o.h(template, "template");
            this.displayablePaywall = displayablePaywall;
            this.template = template;
            this.errors = nonEmptyList;
        }

        /* JADX WARN: Multi-variable type inference failed */
        public static /* synthetic */ Legacy copy$default(Legacy legacy, PaywallData paywallData, PaywallTemplate paywallTemplate, NonEmptyList nonEmptyList, int i6, Object obj) {
            if ((i6 & 1) != 0) {
                paywallData = legacy.displayablePaywall;
            }
            if ((i6 & 2) != 0) {
                paywallTemplate = legacy.template;
            }
            if ((i6 & 4) != 0) {
                nonEmptyList = legacy.errors;
            }
            return legacy.copy(paywallData, paywallTemplate, nonEmptyList);
        }

        public final PaywallData component1() {
            return this.displayablePaywall;
        }

        public final PaywallTemplate component2() {
            return this.template;
        }

        public final NonEmptyList<PaywallValidationError> component3() {
            return this.errors;
        }

        public final Legacy copy(PaywallData displayablePaywall, PaywallTemplate template, NonEmptyList<? extends PaywallValidationError> nonEmptyList) {
            o.h(displayablePaywall, "displayablePaywall");
            o.h(template, "template");
            return new Legacy(displayablePaywall, template, nonEmptyList);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof Legacy)) {
                return false;
            }
            Legacy legacy = (Legacy) obj;
            return o.c(this.displayablePaywall, legacy.displayablePaywall) && this.template == legacy.template && o.c(this.errors, legacy.errors);
        }

        public final PaywallData getDisplayablePaywall() {
            return this.displayablePaywall;
        }

        @Override // com.revenuecat.purchases.ui.revenuecatui.helpers.PaywallValidationResult
        public NonEmptyList<PaywallValidationError> getErrors() {
            return this.errors;
        }

        public final PaywallTemplate getTemplate() {
            return this.template;
        }

        public final PaywallWarning getWarning() {
            PaywallValidationError paywallValidationError;
            NonEmptyList<PaywallValidationError> errors = getErrors();
            if (errors == null || (paywallValidationError = (PaywallValidationError) errors.getHead()) == null) {
                return null;
            }
            return PaywallWarning.Companion.from(paywallValidationError);
        }

        public int hashCode() {
            int iHashCode = (this.template.hashCode() + (this.displayablePaywall.hashCode() * 31)) * 31;
            NonEmptyList<PaywallValidationError> nonEmptyList = this.errors;
            return iHashCode + (nonEmptyList == null ? 0 : nonEmptyList.hashCode());
        }

        public String toString() {
            return "Legacy(displayablePaywall=" + this.displayablePaywall + ", template=" + this.template + ", errors=" + this.errors + ')';
        }

        public /* synthetic */ Legacy(PaywallData paywallData, PaywallTemplate paywallTemplate, NonEmptyList nonEmptyList, int i6, h hVar) {
            this(paywallData, paywallTemplate, (NonEmptyList<? extends PaywallValidationError>) ((i6 & 4) != 0 ? null : nonEmptyList));
        }

        /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
        public Legacy(PaywallData displayablePaywall, PaywallTemplate template, PaywallValidationError error) {
            this(displayablePaywall, template, (NonEmptyList<? extends PaywallValidationError>) NonEmptyListKt.nonEmptyListOf(error, new PaywallValidationError[0]));
            o.h(displayablePaywall, "displayablePaywall");
            o.h(template, "template");
            o.h(error, "error");
        }
    }
}
