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.common.LocalizationKey;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey$$serializer;
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.FitMode;
import com.revenuecat.purchases.paywalls.components.properties.FitModeDeserializer;
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 com.revenuecat.purchases.paywalls.components.properties.ThemeImageUrls;
import com.revenuecat.purchases.paywalls.components.properties.ThemeImageUrls$$serializer;
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 w4.InterfaceC3141c;
import x4.y;

/* JADX INFO: loaded from: classes3.dex */
@Immutable
@InternalRevenueCatAPI
public final class ImageComponent implements PaywallComponent {
    private final Border border;
    private final ColorScheme colorOverlay;
    private final FitMode fitMode;
    private final Padding margin;
    private final MaskShape maskShape;
    private final String overrideSourceLid;
    private final List<ComponentOverride<PartialImageComponent>> overrides;
    private final Padding padding;
    private final Shadow shadow;
    private final Size size;
    private final ThemeImageUrls source;
    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, null, null, new C2416d(ComponentOverride.Companion.serializer(PartialImageComponent$$serializer.INSTANCE))};

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

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

        private Companion() {
        }
    }

    @InterfaceC3141c
    public /* synthetic */ ImageComponent(int i6, ThemeImageUrls themeImageUrls, Boolean bool, Size size, String str, MaskShape maskShape, ColorScheme colorScheme, FitMode fitMode, Padding padding, Padding padding2, Border border, Shadow shadow, List list, a0 a0Var, h hVar) {
        this(i6, themeImageUrls, bool, size, str, maskShape, colorScheme, fitMode, padding, padding2, border, shadow, (List<ComponentOverride<PartialImageComponent>>) list, a0Var);
    }

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

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

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

    /* JADX INFO: renamed from: getOverrideSourceLid-sa7TU9Q$annotations, reason: not valid java name */
    public static /* synthetic */ void m549getOverrideSourceLidsa7TU9Q$annotations() {
    }

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(ImageComponent imageComponent, b bVar, g gVar) {
        a[] aVarArr = $childSerializers;
        bVar.z(gVar, 0, ThemeImageUrls$$serializer.INSTANCE, imageComponent.source);
        if (bVar.g(gVar) || imageComponent.visible != null) {
            bVar.E(gVar, 1, C2419g.f20053a, imageComponent.visible);
        }
        if (bVar.g(gVar) || !o.c(imageComponent.size, new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE))) {
            bVar.z(gVar, 2, Size$$serializer.INSTANCE, imageComponent.size);
        }
        if (bVar.g(gVar) || imageComponent.overrideSourceLid != null) {
            LocalizationKey$$serializer localizationKey$$serializer = LocalizationKey$$serializer.INSTANCE;
            String str = imageComponent.overrideSourceLid;
            bVar.E(gVar, 3, localizationKey$$serializer, str != null ? LocalizationKey.m607boximpl(str) : null);
        }
        if (bVar.g(gVar) || imageComponent.maskShape != null) {
            bVar.E(gVar, 4, MaskShapeDeserializer.INSTANCE, imageComponent.maskShape);
        }
        if (bVar.g(gVar) || imageComponent.colorOverlay != null) {
            bVar.E(gVar, 5, ColorScheme$$serializer.INSTANCE, imageComponent.colorOverlay);
        }
        if (bVar.g(gVar) || imageComponent.fitMode != FitMode.FIT) {
            bVar.z(gVar, 6, FitModeDeserializer.INSTANCE, imageComponent.fitMode);
        }
        if (bVar.g(gVar) || !o.c(imageComponent.padding, Padding.Companion.getZero())) {
            bVar.z(gVar, 7, Padding$$serializer.INSTANCE, imageComponent.padding);
        }
        if (bVar.g(gVar) || !o.c(imageComponent.margin, Padding.Companion.getZero())) {
            bVar.z(gVar, 8, Padding$$serializer.INSTANCE, imageComponent.margin);
        }
        if (bVar.g(gVar) || imageComponent.border != null) {
            bVar.E(gVar, 9, Border$$serializer.INSTANCE, imageComponent.border);
        }
        if (bVar.g(gVar) || imageComponent.shadow != null) {
            bVar.E(gVar, 10, Shadow$$serializer.INSTANCE, imageComponent.shadow);
        }
        if (!bVar.g(gVar) && o.c(imageComponent.overrides, y.f26065a)) {
            return;
        }
        bVar.z(gVar, 11, aVarArr[11], imageComponent.overrides);
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0037  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean equals(Object obj) {
        boolean zM610equalsimpl0;
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof ImageComponent)) {
            return false;
        }
        ImageComponent imageComponent = (ImageComponent) obj;
        if (!o.c(this.source, imageComponent.source) || !o.c(this.visible, imageComponent.visible) || !o.c(this.size, imageComponent.size)) {
            return false;
        }
        String str = this.overrideSourceLid;
        String str2 = imageComponent.overrideSourceLid;
        if (str == null) {
            zM610equalsimpl0 = str2 == null;
        } else if (str2 != null) {
            zM610equalsimpl0 = LocalizationKey.m610equalsimpl0(str, str2);
        }
        return zM610equalsimpl0 && o.c(this.maskShape, imageComponent.maskShape) && o.c(this.colorOverlay, imageComponent.colorOverlay) && this.fitMode == imageComponent.fitMode && o.c(this.padding, imageComponent.padding) && o.c(this.margin, imageComponent.margin) && o.c(this.border, imageComponent.border) && o.c(this.shadow, imageComponent.shadow) && o.c(this.overrides, imageComponent.overrides);
    }

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

    public final /* synthetic */ ColorScheme getColorOverlay() {
        return this.colorOverlay;
    }

    public final /* synthetic */ FitMode getFitMode() {
        return this.fitMode;
    }

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

    public final /* synthetic */ MaskShape getMaskShape() {
        return this.maskShape;
    }

    /* JADX INFO: renamed from: getOverrideSourceLid-sa7TU9Q, reason: not valid java name */
    public final /* synthetic */ String m550getOverrideSourceLidsa7TU9Q() {
        return this.overrideSourceLid;
    }

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

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

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

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

    public final /* synthetic */ ThemeImageUrls getSource() {
        return this.source;
    }

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

    public int hashCode() {
        int iHashCode = this.source.hashCode() * 31;
        Boolean bool = this.visible;
        int iHashCode2 = (this.size.hashCode() + ((iHashCode + (bool == null ? 0 : bool.hashCode())) * 31)) * 31;
        String str = this.overrideSourceLid;
        int iM611hashCodeimpl = (iHashCode2 + (str == null ? 0 : LocalizationKey.m611hashCodeimpl(str))) * 31;
        MaskShape maskShape = this.maskShape;
        int iHashCode3 = (iM611hashCodeimpl + (maskShape == null ? 0 : maskShape.hashCode())) * 31;
        ColorScheme colorScheme = this.colorOverlay;
        int iHashCode4 = (this.margin.hashCode() + ((this.padding.hashCode() + ((this.fitMode.hashCode() + ((iHashCode3 + (colorScheme == null ? 0 : colorScheme.hashCode())) * 31)) * 31)) * 31)) * 31;
        Border border = this.border;
        int iHashCode5 = (iHashCode4 + (border == null ? 0 : border.hashCode())) * 31;
        Shadow shadow = this.shadow;
        return this.overrides.hashCode() + ((iHashCode5 + (shadow != null ? shadow.hashCode() : 0)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("ImageComponent(source=");
        sb.append(this.source);
        sb.append(", visible=");
        sb.append(this.visible);
        sb.append(", size=");
        sb.append(this.size);
        sb.append(", overrideSourceLid=");
        String str = this.overrideSourceLid;
        sb.append((Object) (str == null ? "null" : LocalizationKey.m612toStringimpl(str)));
        sb.append(", maskShape=");
        sb.append(this.maskShape);
        sb.append(", colorOverlay=");
        sb.append(this.colorOverlay);
        sb.append(", fitMode=");
        sb.append(this.fitMode);
        sb.append(", padding=");
        sb.append(this.padding);
        sb.append(", margin=");
        sb.append(this.margin);
        sb.append(", border=");
        sb.append(this.border);
        sb.append(", shadow=");
        sb.append(this.shadow);
        sb.append(", overrides=");
        return A0.a.o(sb, this.overrides, ')');
    }

    public /* synthetic */ ImageComponent(ThemeImageUrls themeImageUrls, Boolean bool, Size size, String str, MaskShape maskShape, ColorScheme colorScheme, FitMode fitMode, Padding padding, Padding padding2, Border border, Shadow shadow, List list, h hVar) {
        this(themeImageUrls, bool, size, str, maskShape, colorScheme, fitMode, padding, padding2, border, shadow, list);
    }

    private ImageComponent(int i6, ThemeImageUrls themeImageUrls, Boolean bool, Size size, String str, MaskShape maskShape, ColorScheme colorScheme, FitMode fitMode, Padding padding, Padding padding2, Border border, Shadow shadow, List<ComponentOverride<PartialImageComponent>> list, a0 a0Var) {
        if (1 != (i6 & 1)) {
            P.h(i6, 1, ImageComponent$$serializer.INSTANCE.getDescriptor());
            throw null;
        }
        this.source = themeImageUrls;
        if ((i6 & 2) == 0) {
            this.visible = null;
        } else {
            this.visible = bool;
        }
        if ((i6 & 4) == 0) {
            this.size = new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE);
        } else {
            this.size = size;
        }
        if ((i6 & 8) == 0) {
            this.overrideSourceLid = null;
        } else {
            this.overrideSourceLid = str;
        }
        if ((i6 & 16) == 0) {
            this.maskShape = null;
        } else {
            this.maskShape = maskShape;
        }
        if ((i6 & 32) == 0) {
            this.colorOverlay = null;
        } else {
            this.colorOverlay = colorScheme;
        }
        if ((i6 & 64) == 0) {
            this.fitMode = FitMode.FIT;
        } else {
            this.fitMode = fitMode;
        }
        if ((i6 & 128) == 0) {
            this.padding = Padding.Companion.getZero();
        } else {
            this.padding = padding;
        }
        if ((i6 & 256) == 0) {
            this.margin = Padding.Companion.getZero();
        } else {
            this.margin = padding2;
        }
        if ((i6 & 512) == 0) {
            this.border = null;
        } else {
            this.border = border;
        }
        if ((i6 & 1024) == 0) {
            this.shadow = null;
        } else {
            this.shadow = shadow;
        }
        this.overrides = (i6 & 2048) == 0 ? y.f26065a : list;
    }

    private ImageComponent(ThemeImageUrls source, Boolean bool, Size size, String str, MaskShape maskShape, ColorScheme colorScheme, FitMode fitMode, Padding padding, Padding margin, Border border, Shadow shadow, List<ComponentOverride<PartialImageComponent>> overrides) {
        o.h(source, "source");
        o.h(size, "size");
        o.h(fitMode, "fitMode");
        o.h(padding, "padding");
        o.h(margin, "margin");
        o.h(overrides, "overrides");
        this.source = source;
        this.visible = bool;
        this.size = size;
        this.overrideSourceLid = str;
        this.maskShape = maskShape;
        this.colorOverlay = colorScheme;
        this.fitMode = fitMode;
        this.padding = padding;
        this.margin = margin;
        this.border = border;
        this.shadow = shadow;
        this.overrides = overrides;
    }

    public /* synthetic */ ImageComponent(ThemeImageUrls themeImageUrls, Boolean bool, Size size, String str, MaskShape maskShape, ColorScheme colorScheme, FitMode fitMode, Padding padding, Padding padding2, Border border, Shadow shadow, List list, int i6, h hVar) {
        this(themeImageUrls, (i6 & 2) != 0 ? null : bool, (i6 & 4) != 0 ? new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE) : size, (i6 & 8) != 0 ? null : str, (i6 & 16) != 0 ? null : maskShape, (i6 & 32) != 0 ? null : colorScheme, (i6 & 64) != 0 ? FitMode.FIT : fitMode, (i6 & 128) != 0 ? Padding.Companion.getZero() : padding, (i6 & 256) != 0 ? Padding.Companion.getZero() : padding2, (i6 & 512) != 0 ? null : border, (i6 & 1024) != 0 ? null : shadow, (i6 & 2048) != 0 ? y.f26065a : list, null);
    }
}
