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

import androidx.compose.runtime.Immutable;
import com.google.android.recaptcha.internal.a;
import com.revenuecat.purchases.Package;
import com.revenuecat.purchases.models.SubscriptionOption;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.ui.revenuecatui.helpers.ResolvedOffer;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;

/* JADX INFO: loaded from: classes3.dex */
@Immutable
public final class PackageComponentStyle implements ComponentStyle {
    public static final int $stable = 0;
    private final boolean isSelectable;
    private final boolean isSelectedByDefault;
    private final Package rcPackage;
    private final ResolvedOffer resolvedOffer;
    private final Size size;
    private final StackComponentStyle stackComponentStyle;
    private final boolean visible;

    public PackageComponentStyle(Package rcPackage, boolean z6, StackComponentStyle stackComponentStyle, boolean z7, ResolvedOffer resolvedOffer) {
        o.h(rcPackage, "rcPackage");
        o.h(stackComponentStyle, "stackComponentStyle");
        this.rcPackage = rcPackage;
        this.isSelectedByDefault = z6;
        this.stackComponentStyle = stackComponentStyle;
        this.isSelectable = z7;
        this.resolvedOffer = resolvedOffer;
        this.visible = stackComponentStyle.getVisible();
        this.size = stackComponentStyle.getSize();
    }

    public static /* synthetic */ PackageComponentStyle copy$default(PackageComponentStyle packageComponentStyle, Package r12, boolean z6, StackComponentStyle stackComponentStyle, boolean z7, ResolvedOffer resolvedOffer, int i6, Object obj) {
        if ((i6 & 1) != 0) {
            r12 = packageComponentStyle.rcPackage;
        }
        if ((i6 & 2) != 0) {
            z6 = packageComponentStyle.isSelectedByDefault;
        }
        if ((i6 & 4) != 0) {
            stackComponentStyle = packageComponentStyle.stackComponentStyle;
        }
        if ((i6 & 8) != 0) {
            z7 = packageComponentStyle.isSelectable;
        }
        if ((i6 & 16) != 0) {
            resolvedOffer = packageComponentStyle.resolvedOffer;
        }
        ResolvedOffer resolvedOffer2 = resolvedOffer;
        StackComponentStyle stackComponentStyle2 = stackComponentStyle;
        return packageComponentStyle.copy(r12, z6, stackComponentStyle2, z7, resolvedOffer2);
    }

    public final Package component1() {
        return this.rcPackage;
    }

    public final boolean component2() {
        return this.isSelectedByDefault;
    }

    public final StackComponentStyle component3() {
        return this.stackComponentStyle;
    }

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

    public final ResolvedOffer component5() {
        return this.resolvedOffer;
    }

    public final PackageComponentStyle copy(Package rcPackage, boolean z6, StackComponentStyle stackComponentStyle, boolean z7, ResolvedOffer resolvedOffer) {
        o.h(rcPackage, "rcPackage");
        o.h(stackComponentStyle, "stackComponentStyle");
        return new PackageComponentStyle(rcPackage, z6, stackComponentStyle, z7, resolvedOffer);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof PackageComponentStyle)) {
            return false;
        }
        PackageComponentStyle packageComponentStyle = (PackageComponentStyle) obj;
        return o.c(this.rcPackage, packageComponentStyle.rcPackage) && this.isSelectedByDefault == packageComponentStyle.isSelectedByDefault && o.c(this.stackComponentStyle, packageComponentStyle.stackComponentStyle) && this.isSelectable == packageComponentStyle.isSelectable && o.c(this.resolvedOffer, packageComponentStyle.resolvedOffer);
    }

    public final /* synthetic */ Package getRcPackage() {
        return this.rcPackage;
    }

    public final /* synthetic */ ResolvedOffer getResolvedOffer() {
        return this.resolvedOffer;
    }

    @Override // com.revenuecat.purchases.ui.revenuecatui.components.style.ComponentStyle
    public Size getSize() {
        return this.size;
    }

    public final /* synthetic */ StackComponentStyle getStackComponentStyle() {
        return this.stackComponentStyle;
    }

    public final /* synthetic */ String getUniqueId() {
        SubscriptionOption option;
        ResolvedOffer resolvedOffer = this.resolvedOffer;
        String id = null;
        ResolvedOffer.ConfiguredOffer configuredOffer = resolvedOffer instanceof ResolvedOffer.ConfiguredOffer ? (ResolvedOffer.ConfiguredOffer) resolvedOffer : null;
        if (configuredOffer != null && (option = configuredOffer.getOption()) != null) {
            id = option.getId();
        }
        if (id == null) {
            return this.rcPackage.getIdentifier();
        }
        return this.rcPackage.getIdentifier() + ':' + id;
    }

    @Override // com.revenuecat.purchases.ui.revenuecatui.components.style.ComponentStyle
    public boolean getVisible() {
        return this.visible;
    }

    public int hashCode() {
        int iF = a.f((this.stackComponentStyle.hashCode() + a.f(this.rcPackage.hashCode() * 31, 31, this.isSelectedByDefault)) * 31, 31, this.isSelectable);
        ResolvedOffer resolvedOffer = this.resolvedOffer;
        return iF + (resolvedOffer == null ? 0 : resolvedOffer.hashCode());
    }

    public final /* synthetic */ boolean isSelectable() {
        return this.isSelectable;
    }

    public final /* synthetic */ boolean isSelectedByDefault() {
        return this.isSelectedByDefault;
    }

    public String toString() {
        return "PackageComponentStyle(rcPackage=" + this.rcPackage + ", isSelectedByDefault=" + this.isSelectedByDefault + ", stackComponentStyle=" + this.stackComponentStyle + ", isSelectable=" + this.isSelectable + ", resolvedOffer=" + this.resolvedOffer + ')';
    }

    public /* synthetic */ PackageComponentStyle(Package r7, boolean z6, StackComponentStyle stackComponentStyle, boolean z7, ResolvedOffer resolvedOffer, int i6, h hVar) {
        this(r7, z6, stackComponentStyle, z7, (i6 & 16) != 0 ? null : resolvedOffer);
    }
}
