package com.revenuecat.purchases.paywalls.components;

import androidx.compose.runtime.Immutable;
import com.revenuecat.purchases.InternalRevenueCatAPI;
import com.revenuecat.purchases.paywalls.components.common.ComponentOverride;
import com.revenuecat.purchases.paywalls.components.properties.Border;
import com.revenuecat.purchases.paywalls.components.properties.Border$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.ColorScheme;
import com.revenuecat.purchases.paywalls.components.properties.ColorScheme$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.MaskShape;
import com.revenuecat.purchases.paywalls.components.properties.MaskShapeDeserializer;
import com.revenuecat.purchases.paywalls.components.properties.Padding;
import com.revenuecat.purchases.paywalls.components.properties.Padding$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.Shadow;
import com.revenuecat.purchases.paywalls.components.properties.Shadow$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.paywalls.components.properties.Size$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.SizeConstraint;
import g5.a;
import i5.g;
import j5.b;
import java.util.List;
import k5.C2416d;
import k5.C2419g;
import k5.P;
import k5.a0;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import q.AbstractC2761L;
import w4.InterfaceC3141c;
import x4.y;

/* JADX INFO: loaded from: classes3.dex */
@Immutable
@InternalRevenueCatAPI
public final class IconComponent implements PaywallComponent {
    private final String baseUrl;
    private final ColorScheme color;
    private final Formats formats;
    private final IconBackground iconBackground;
    private final String iconName;
    private final Padding margin;
    private final List<ComponentOverride<PartialIconComponent>> overrides;
    private final Padding padding;
    private final Size size;
    private final Boolean visible;
    public static final Companion Companion = new Companion(null);
    private static final a[] $childSerializers = {null, null, null, null, null, null, null, null, null, new C2416d(ComponentOverride.Companion.serializer(PartialIconComponent$$serializer.INSTANCE))};

    public static final class Companion {
        public /* synthetic */ Companion(h hVar) {
            this();
        }

        public final a serializer() {
            return IconComponent$$serializer.INSTANCE;
        }

        private Companion() {
        }
    }

    @Immutable
    public static final class Formats {
        public static final Companion Companion = new Companion(null);
        private final String webp;

        public static final class Companion {
            public /* synthetic */ Companion(h hVar) {
                this();
            }

            public final a serializer() {
                return IconComponent$Formats$$serializer.INSTANCE;
            }

            private Companion() {
            }
        }

        @InterfaceC3141c
        public /* synthetic */ Formats(int i6, String str, a0 a0Var) {
            if (1 == (i6 & 1)) {
                this.webp = str;
            } else {
                P.h(i6, 1, IconComponent$Formats$$serializer.INSTANCE.getDescriptor());
                throw null;
            }
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            return (obj instanceof Formats) && o.c(this.webp, ((Formats) obj).webp);
        }

        public final /* synthetic */ String getWebp() {
            return this.webp;
        }

        public int hashCode() {
            return this.webp.hashCode();
        }

        public String toString() {
            return Z0.o.r(new StringBuilder("Formats(webp="), this.webp, ')');
        }

        public Formats(String webp) {
            o.h(webp, "webp");
            this.webp = webp;
        }
    }

    @Immutable
    public static final class IconBackground {
        public static final Companion Companion = new Companion(null);
        private final Border border;
        private final ColorScheme color;
        private final Shadow shadow;
        private final MaskShape shape;

        public static final class Companion {
            public /* synthetic */ Companion(h hVar) {
                this();
            }

            public final a serializer() {
                return IconComponent$IconBackground$$serializer.INSTANCE;
            }

            private Companion() {
            }
        }

        @InterfaceC3141c
        public /* synthetic */ IconBackground(int i6, ColorScheme colorScheme, MaskShape maskShape, Border border, Shadow shadow, a0 a0Var) {
            if (3 != (i6 & 3)) {
                P.h(i6, 3, IconComponent$IconBackground$$serializer.INSTANCE.getDescriptor());
                throw null;
            }
            this.color = colorScheme;
            this.shape = maskShape;
            if ((i6 & 4) == 0) {
                this.border = null;
            } else {
                this.border = border;
            }
            if ((i6 & 8) == 0) {
                this.shadow = null;
            } else {
                this.shadow = shadow;
            }
        }

        public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(IconBackground iconBackground, b bVar, g gVar) {
            bVar.z(gVar, 0, ColorScheme$$serializer.INSTANCE, iconBackground.color);
            bVar.z(gVar, 1, MaskShapeDeserializer.INSTANCE, iconBackground.shape);
            if (bVar.g(gVar) || iconBackground.border != null) {
                bVar.E(gVar, 2, Border$$serializer.INSTANCE, iconBackground.border);
            }
            if (!bVar.g(gVar) && iconBackground.shadow == null) {
                return;
            }
            bVar.E(gVar, 3, Shadow$$serializer.INSTANCE, iconBackground.shadow);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof IconBackground)) {
                return false;
            }
            IconBackground iconBackground = (IconBackground) obj;
            return o.c(this.color, iconBackground.color) && o.c(this.shape, iconBackground.shape) && o.c(this.border, iconBackground.border) && o.c(this.shadow, iconBackground.shadow);
        }

        public final /* synthetic */ Border getBorder() {
            return this.border;
        }

        public final /* synthetic */ ColorScheme getColor() {
            return this.color;
        }

        public final /* synthetic */ Shadow getShadow() {
            return this.shadow;
        }

        public final /* synthetic */ MaskShape getShape() {
            return this.shape;
        }

        public int hashCode() {
            int iHashCode = (this.shape.hashCode() + (this.color.hashCode() * 31)) * 31;
            Border border = this.border;
            int iHashCode2 = (iHashCode + (border == null ? 0 : border.hashCode())) * 31;
            Shadow shadow = this.shadow;
            return iHashCode2 + (shadow != null ? shadow.hashCode() : 0);
        }

        public String toString() {
            return "IconBackground(color=" + this.color + ", shape=" + this.shape + ", border=" + this.border + ", shadow=" + this.shadow + ')';
        }

        public IconBackground(ColorScheme color, MaskShape shape, Border border, Shadow shadow) {
            o.h(color, "color");
            o.h(shape, "shape");
            this.color = color;
            this.shape = shape;
            this.border = border;
            this.shadow = shadow;
        }

        public /* synthetic */ IconBackground(ColorScheme colorScheme, MaskShape maskShape, Border border, Shadow shadow, int i6, h hVar) {
            this(colorScheme, maskShape, (i6 & 4) != 0 ? null : border, (i6 & 8) != 0 ? null : shadow);
        }
    }

    @InterfaceC3141c
    public /* synthetic */ IconComponent(int i6, String str, String str2, Formats formats, Boolean bool, Size size, ColorScheme colorScheme, Padding padding, Padding padding2, IconBackground iconBackground, List list, a0 a0Var) {
        if (7 != (i6 & 7)) {
            P.h(i6, 7, IconComponent$$serializer.INSTANCE.getDescriptor());
            throw null;
        }
        this.baseUrl = str;
        this.iconName = str2;
        this.formats = formats;
        if ((i6 & 8) == 0) {
            this.visible = null;
        } else {
            this.visible = bool;
        }
        if ((i6 & 16) == 0) {
            this.size = new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE);
        } else {
            this.size = size;
        }
        if ((i6 & 32) == 0) {
            this.color = null;
        } else {
            this.color = colorScheme;
        }
        if ((i6 & 64) == 0) {
            this.padding = Padding.Companion.getZero();
        } else {
            this.padding = padding;
        }
        if ((i6 & 128) == 0) {
            this.margin = Padding.Companion.getZero();
        } else {
            this.margin = padding2;
        }
        if ((i6 & 256) == 0) {
            this.iconBackground = null;
        } else {
            this.iconBackground = iconBackground;
        }
        if ((i6 & 512) == 0) {
            this.overrides = y.f26065a;
        } else {
            this.overrides = list;
        }
    }

    public static /* synthetic */ void getBaseUrl$annotations() {
    }

    public static /* synthetic */ void getIconBackground$annotations() {
    }

    public static /* synthetic */ void getIconName$annotations() {
    }

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(IconComponent iconComponent, b bVar, g gVar) {
        a[] aVarArr = $childSerializers;
        bVar.A(gVar, 0, iconComponent.baseUrl);
        bVar.A(gVar, 1, iconComponent.iconName);
        bVar.z(gVar, 2, IconComponent$Formats$$serializer.INSTANCE, iconComponent.formats);
        if (bVar.g(gVar) || iconComponent.visible != null) {
            bVar.E(gVar, 3, C2419g.f20053a, iconComponent.visible);
        }
        if (bVar.g(gVar) || !o.c(iconComponent.size, new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE))) {
            bVar.z(gVar, 4, Size$$serializer.INSTANCE, iconComponent.size);
        }
        if (bVar.g(gVar) || iconComponent.color != null) {
            bVar.E(gVar, 5, ColorScheme$$serializer.INSTANCE, iconComponent.color);
        }
        if (bVar.g(gVar) || !o.c(iconComponent.padding, Padding.Companion.getZero())) {
            bVar.z(gVar, 6, Padding$$serializer.INSTANCE, iconComponent.padding);
        }
        if (bVar.g(gVar) || !o.c(iconComponent.margin, Padding.Companion.getZero())) {
            bVar.z(gVar, 7, Padding$$serializer.INSTANCE, iconComponent.margin);
        }
        if (bVar.g(gVar) || iconComponent.iconBackground != null) {
            bVar.E(gVar, 8, IconComponent$IconBackground$$serializer.INSTANCE, iconComponent.iconBackground);
        }
        if (!bVar.g(gVar) && o.c(iconComponent.overrides, y.f26065a)) {
            return;
        }
        bVar.z(gVar, 9, aVarArr[9], iconComponent.overrides);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof IconComponent)) {
            return false;
        }
        IconComponent iconComponent = (IconComponent) obj;
        return o.c(this.baseUrl, iconComponent.baseUrl) && o.c(this.iconName, iconComponent.iconName) && o.c(this.formats, iconComponent.formats) && o.c(this.visible, iconComponent.visible) && o.c(this.size, iconComponent.size) && o.c(this.color, iconComponent.color) && o.c(this.padding, iconComponent.padding) && o.c(this.margin, iconComponent.margin) && o.c(this.iconBackground, iconComponent.iconBackground) && o.c(this.overrides, iconComponent.overrides);
    }

    public final /* synthetic */ String getBaseUrl() {
        return this.baseUrl;
    }

    public final /* synthetic */ ColorScheme getColor() {
        return this.color;
    }

    public final /* synthetic */ Formats getFormats() {
        return this.formats;
    }

    public final /* synthetic */ IconBackground getIconBackground() {
        return this.iconBackground;
    }

    public final /* synthetic */ String getIconName() {
        return this.iconName;
    }

    public final /* synthetic */ Padding getMargin() {
        return this.margin;
    }

    public final /* synthetic */ List getOverrides() {
        return this.overrides;
    }

    public final /* synthetic */ Padding getPadding() {
        return this.padding;
    }

    public final /* synthetic */ Size getSize() {
        return this.size;
    }

    public final /* synthetic */ Boolean getVisible() {
        return this.visible;
    }

    public int hashCode() {
        int iHashCode = (this.formats.hashCode() + AbstractC2761L.b(this.baseUrl.hashCode() * 31, 31, this.iconName)) * 31;
        Boolean bool = this.visible;
        int iHashCode2 = (this.size.hashCode() + ((iHashCode + (bool == null ? 0 : bool.hashCode())) * 31)) * 31;
        ColorScheme colorScheme = this.color;
        int iHashCode3 = (this.margin.hashCode() + ((this.padding.hashCode() + ((iHashCode2 + (colorScheme == null ? 0 : colorScheme.hashCode())) * 31)) * 31)) * 31;
        IconBackground iconBackground = this.iconBackground;
        return this.overrides.hashCode() + ((iHashCode3 + (iconBackground != null ? iconBackground.hashCode() : 0)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("IconComponent(baseUrl=");
        sb.append(this.baseUrl);
        sb.append(", iconName=");
        sb.append(this.iconName);
        sb.append(", formats=");
        sb.append(this.formats);
        sb.append(", visible=");
        sb.append(this.visible);
        sb.append(", size=");
        sb.append(this.size);
        sb.append(", color=");
        sb.append(this.color);
        sb.append(", padding=");
        sb.append(this.padding);
        sb.append(", margin=");
        sb.append(this.margin);
        sb.append(", iconBackground=");
        sb.append(this.iconBackground);
        sb.append(", overrides=");
        return A0.a.o(sb, this.overrides, ')');
    }

    public IconComponent(String baseUrl, String iconName, Formats formats, Boolean bool, Size size, ColorScheme colorScheme, Padding padding, Padding margin, IconBackground iconBackground, List<ComponentOverride<PartialIconComponent>> overrides) {
        o.h(baseUrl, "baseUrl");
        o.h(iconName, "iconName");
        o.h(formats, "formats");
        o.h(size, "size");
        o.h(padding, "padding");
        o.h(margin, "margin");
        o.h(overrides, "overrides");
        this.baseUrl = baseUrl;
        this.iconName = iconName;
        this.formats = formats;
        this.visible = bool;
        this.size = size;
        this.color = colorScheme;
        this.padding = padding;
        this.margin = margin;
        this.iconBackground = iconBackground;
        this.overrides = overrides;
    }

    public /* synthetic */ IconComponent(String str, String str2, Formats formats, Boolean bool, Size size, ColorScheme colorScheme, Padding padding, Padding padding2, IconBackground iconBackground, List list, int i6, h hVar) {
        this(str, str2, formats, (i6 & 8) != 0 ? null : bool, (i6 & 16) != 0 ? new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE) : size, (i6 & 32) != 0 ? null : colorScheme, (i6 & 64) != 0 ? Padding.Companion.getZero() : padding, (i6 & 128) != 0 ? Padding.Companion.getZero() : padding2, (i6 & 256) != 0 ? null : iconBackground, (i6 & 512) != 0 ? y.f26065a : list);
    }
}
