package com.revenuecat.purchases.paywalls.components;

import androidx.compose.runtime.Immutable;
import com.revenuecat.purchases.FontAlias;
import com.revenuecat.purchases.FontAlias$$serializer;
import com.revenuecat.purchases.InternalRevenueCatAPI;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey$$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.FontWeight;
import com.revenuecat.purchases.paywalls.components.properties.FontWeightDeserializer;
import com.revenuecat.purchases.paywalls.components.properties.HorizontalAlignment;
import com.revenuecat.purchases.paywalls.components.properties.HorizontalAlignmentDeserializer;
import com.revenuecat.purchases.paywalls.components.properties.Padding;
import com.revenuecat.purchases.paywalls.components.properties.Padding$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.paywalls.components.properties.Size$$serializer;
import g5.a;
import i5.g;
import j5.b;
import k5.C2419g;
import k5.F;
import k5.a0;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import w4.InterfaceC3141c;

/* JADX INFO: loaded from: classes3.dex */
@Immutable
@InternalRevenueCatAPI
public final class PartialTextComponent implements PartialComponent {
    public static final Companion Companion = new Companion(null);
    private final ColorScheme backgroundColor;
    private final ColorScheme color;
    private final String fontName;
    private final Integer fontSize;
    private final FontWeight fontWeight;
    private final Integer fontWeightInt;
    private final HorizontalAlignment horizontalAlignment;
    private final Padding margin;
    private final Padding padding;
    private final Size size;
    private final String text;
    private final Boolean visible;

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

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

        private Companion() {
        }
    }

    @InterfaceC3141c
    public /* synthetic */ PartialTextComponent(int i6, Boolean bool, String str, ColorScheme colorScheme, ColorScheme colorScheme2, String str2, FontWeight fontWeight, Integer num, Integer num2, HorizontalAlignment horizontalAlignment, Size size, Padding padding, Padding padding2, a0 a0Var, h hVar) {
        this(i6, bool, str, colorScheme, colorScheme2, str2, fontWeight, num, num2, horizontalAlignment, size, padding, padding2, a0Var);
    }

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

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

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

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

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

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

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

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(PartialTextComponent partialTextComponent, b bVar, g gVar) {
        if (bVar.g(gVar) || !o.c(partialTextComponent.visible, Boolean.TRUE)) {
            bVar.E(gVar, 0, C2419g.f20053a, partialTextComponent.visible);
        }
        if (bVar.g(gVar) || partialTextComponent.text != null) {
            LocalizationKey$$serializer localizationKey$$serializer = LocalizationKey$$serializer.INSTANCE;
            String str = partialTextComponent.text;
            bVar.E(gVar, 1, localizationKey$$serializer, str != null ? LocalizationKey.m607boximpl(str) : null);
        }
        if (bVar.g(gVar) || partialTextComponent.color != null) {
            bVar.E(gVar, 2, ColorScheme$$serializer.INSTANCE, partialTextComponent.color);
        }
        if (bVar.g(gVar) || partialTextComponent.backgroundColor != null) {
            bVar.E(gVar, 3, ColorScheme$$serializer.INSTANCE, partialTextComponent.backgroundColor);
        }
        if (bVar.g(gVar) || partialTextComponent.fontName != null) {
            FontAlias$$serializer fontAlias$$serializer = FontAlias$$serializer.INSTANCE;
            String str2 = partialTextComponent.fontName;
            bVar.E(gVar, 4, fontAlias$$serializer, str2 != null ? FontAlias.m396boximpl(str2) : null);
        }
        if (bVar.g(gVar) || partialTextComponent.fontWeight != null) {
            bVar.E(gVar, 5, FontWeightDeserializer.INSTANCE, partialTextComponent.fontWeight);
        }
        if (bVar.g(gVar) || partialTextComponent.fontWeightInt != null) {
            bVar.E(gVar, 6, F.f19995a, partialTextComponent.fontWeightInt);
        }
        if (bVar.g(gVar) || partialTextComponent.fontSize != null) {
            bVar.E(gVar, 7, FontSizeSerializer.INSTANCE, partialTextComponent.fontSize);
        }
        if (bVar.g(gVar) || partialTextComponent.horizontalAlignment != null) {
            bVar.E(gVar, 8, HorizontalAlignmentDeserializer.INSTANCE, partialTextComponent.horizontalAlignment);
        }
        if (bVar.g(gVar) || partialTextComponent.size != null) {
            bVar.E(gVar, 9, Size$$serializer.INSTANCE, partialTextComponent.size);
        }
        if (bVar.g(gVar) || partialTextComponent.padding != null) {
            bVar.E(gVar, 10, Padding$$serializer.INSTANCE, partialTextComponent.padding);
        }
        if (!bVar.g(gVar) && partialTextComponent.margin == null) {
            return;
        }
        bVar.E(gVar, 11, Padding$$serializer.INSTANCE, partialTextComponent.margin);
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x0021  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x004d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean equals(Object obj) {
        boolean zM610equalsimpl0;
        boolean zM399equalsimpl0;
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof PartialTextComponent)) {
            return false;
        }
        PartialTextComponent partialTextComponent = (PartialTextComponent) obj;
        if (!o.c(this.visible, partialTextComponent.visible)) {
            return false;
        }
        String str = this.text;
        String str2 = partialTextComponent.text;
        if (str == null) {
            zM610equalsimpl0 = str2 == null;
        } else if (str2 != null) {
            zM610equalsimpl0 = LocalizationKey.m610equalsimpl0(str, str2);
        }
        if (!zM610equalsimpl0 || !o.c(this.color, partialTextComponent.color) || !o.c(this.backgroundColor, partialTextComponent.backgroundColor)) {
            return false;
        }
        String str3 = this.fontName;
        String str4 = partialTextComponent.fontName;
        if (str3 == null) {
            zM399equalsimpl0 = str4 == null;
        } else if (str4 != null) {
            zM399equalsimpl0 = FontAlias.m399equalsimpl0(str3, str4);
        }
        return zM399equalsimpl0 && this.fontWeight == partialTextComponent.fontWeight && o.c(this.fontWeightInt, partialTextComponent.fontWeightInt) && o.c(this.fontSize, partialTextComponent.fontSize) && this.horizontalAlignment == partialTextComponent.horizontalAlignment && o.c(this.size, partialTextComponent.size) && o.c(this.padding, partialTextComponent.padding) && o.c(this.margin, partialTextComponent.margin);
    }

    public final /* synthetic */ ColorScheme getBackgroundColor() {
        return this.backgroundColor;
    }

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

    /* JADX INFO: renamed from: getFontName-ARcRonI, reason: not valid java name */
    public final /* synthetic */ String m555getFontNameARcRonI() {
        return this.fontName;
    }

    public final /* synthetic */ Integer getFontSize() {
        return this.fontSize;
    }

    public final /* synthetic */ FontWeight getFontWeight() {
        return this.fontWeight;
    }

    public final /* synthetic */ Integer getFontWeightInt() {
        return this.fontWeightInt;
    }

    public final /* synthetic */ HorizontalAlignment getHorizontalAlignment() {
        return this.horizontalAlignment;
    }

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

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

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

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

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

    public int hashCode() {
        Boolean bool = this.visible;
        int iHashCode = (bool == null ? 0 : bool.hashCode()) * 31;
        String str = this.text;
        int iM611hashCodeimpl = (iHashCode + (str == null ? 0 : LocalizationKey.m611hashCodeimpl(str))) * 31;
        ColorScheme colorScheme = this.color;
        int iHashCode2 = (iM611hashCodeimpl + (colorScheme == null ? 0 : colorScheme.hashCode())) * 31;
        ColorScheme colorScheme2 = this.backgroundColor;
        int iHashCode3 = (iHashCode2 + (colorScheme2 == null ? 0 : colorScheme2.hashCode())) * 31;
        String str2 = this.fontName;
        int iM400hashCodeimpl = (iHashCode3 + (str2 == null ? 0 : FontAlias.m400hashCodeimpl(str2))) * 31;
        FontWeight fontWeight = this.fontWeight;
        int iHashCode4 = (iM400hashCodeimpl + (fontWeight == null ? 0 : fontWeight.hashCode())) * 31;
        Integer num = this.fontWeightInt;
        int iHashCode5 = (iHashCode4 + (num == null ? 0 : num.hashCode())) * 31;
        Integer num2 = this.fontSize;
        int iHashCode6 = (iHashCode5 + (num2 == null ? 0 : num2.hashCode())) * 31;
        HorizontalAlignment horizontalAlignment = this.horizontalAlignment;
        int iHashCode7 = (iHashCode6 + (horizontalAlignment == null ? 0 : horizontalAlignment.hashCode())) * 31;
        Size size = this.size;
        int iHashCode8 = (iHashCode7 + (size == null ? 0 : size.hashCode())) * 31;
        Padding padding = this.padding;
        int iHashCode9 = (iHashCode8 + (padding == null ? 0 : padding.hashCode())) * 31;
        Padding padding2 = this.margin;
        return iHashCode9 + (padding2 != null ? padding2.hashCode() : 0);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("PartialTextComponent(visible=");
        sb.append(this.visible);
        sb.append(", text=");
        String str = this.text;
        sb.append((Object) (str == null ? "null" : LocalizationKey.m612toStringimpl(str)));
        sb.append(", color=");
        sb.append(this.color);
        sb.append(", backgroundColor=");
        sb.append(this.backgroundColor);
        sb.append(", fontName=");
        String str2 = this.fontName;
        sb.append((Object) (str2 != null ? FontAlias.m401toStringimpl(str2) : "null"));
        sb.append(", fontWeight=");
        sb.append(this.fontWeight);
        sb.append(", fontWeightInt=");
        sb.append(this.fontWeightInt);
        sb.append(", fontSize=");
        sb.append(this.fontSize);
        sb.append(", horizontalAlignment=");
        sb.append(this.horizontalAlignment);
        sb.append(", size=");
        sb.append(this.size);
        sb.append(", padding=");
        sb.append(this.padding);
        sb.append(", margin=");
        sb.append(this.margin);
        sb.append(')');
        return sb.toString();
    }

    public /* synthetic */ PartialTextComponent(Boolean bool, String str, ColorScheme colorScheme, ColorScheme colorScheme2, String str2, FontWeight fontWeight, Integer num, Integer num2, HorizontalAlignment horizontalAlignment, Size size, Padding padding, Padding padding2, h hVar) {
        this(bool, str, colorScheme, colorScheme2, str2, fontWeight, num, num2, horizontalAlignment, size, padding, padding2);
    }

    private PartialTextComponent(int i6, Boolean bool, String str, ColorScheme colorScheme, ColorScheme colorScheme2, String str2, FontWeight fontWeight, Integer num, Integer num2, HorizontalAlignment horizontalAlignment, Size size, Padding padding, Padding padding2, a0 a0Var) {
        this.visible = (i6 & 1) == 0 ? Boolean.TRUE : bool;
        if ((i6 & 2) == 0) {
            this.text = null;
        } else {
            this.text = str;
        }
        if ((i6 & 4) == 0) {
            this.color = null;
        } else {
            this.color = colorScheme;
        }
        if ((i6 & 8) == 0) {
            this.backgroundColor = null;
        } else {
            this.backgroundColor = colorScheme2;
        }
        if ((i6 & 16) == 0) {
            this.fontName = null;
        } else {
            this.fontName = str2;
        }
        if ((i6 & 32) == 0) {
            this.fontWeight = null;
        } else {
            this.fontWeight = fontWeight;
        }
        if ((i6 & 64) == 0) {
            this.fontWeightInt = null;
        } else {
            this.fontWeightInt = num;
        }
        if ((i6 & 128) == 0) {
            this.fontSize = null;
        } else {
            this.fontSize = num2;
        }
        if ((i6 & 256) == 0) {
            this.horizontalAlignment = null;
        } else {
            this.horizontalAlignment = horizontalAlignment;
        }
        if ((i6 & 512) == 0) {
            this.size = null;
        } else {
            this.size = size;
        }
        if ((i6 & 1024) == 0) {
            this.padding = null;
        } else {
            this.padding = padding;
        }
        if ((i6 & 2048) == 0) {
            this.margin = null;
        } else {
            this.margin = padding2;
        }
    }

    private PartialTextComponent(Boolean bool, String str, ColorScheme colorScheme, ColorScheme colorScheme2, String str2, FontWeight fontWeight, Integer num, Integer num2, HorizontalAlignment horizontalAlignment, Size size, Padding padding, Padding padding2) {
        this.visible = bool;
        this.text = str;
        this.color = colorScheme;
        this.backgroundColor = colorScheme2;
        this.fontName = str2;
        this.fontWeight = fontWeight;
        this.fontWeightInt = num;
        this.fontSize = num2;
        this.horizontalAlignment = horizontalAlignment;
        this.size = size;
        this.padding = padding;
        this.margin = padding2;
    }

    /* JADX WARN: Illegal instructions before constructor call */
    public /* synthetic */ PartialTextComponent(Boolean bool, String str, ColorScheme colorScheme, ColorScheme colorScheme2, String str2, FontWeight fontWeight, Integer num, Integer num2, HorizontalAlignment horizontalAlignment, Size size, Padding padding, Padding padding2, int i6, h hVar) {
        Boolean bool2 = (i6 & 1) != 0 ? Boolean.TRUE : bool;
        String str3 = (i6 & 2) != 0 ? null : str;
        ColorScheme colorScheme3 = (i6 & 4) != 0 ? null : colorScheme;
        ColorScheme colorScheme4 = (i6 & 8) != 0 ? null : colorScheme2;
        String str4 = (i6 & 16) != 0 ? null : str2;
        FontWeight fontWeight2 = (i6 & 32) != 0 ? null : fontWeight;
        Integer num3 = (i6 & 64) != 0 ? null : num;
        Integer num4 = (i6 & 128) != 0 ? null : num2;
        HorizontalAlignment horizontalAlignment2 = (i6 & 256) != 0 ? null : horizontalAlignment;
        Size size2 = (i6 & 512) != 0 ? null : size;
        Padding padding3 = (i6 & 1024) != 0 ? null : padding;
        this(bool2, str3, colorScheme3, colorScheme4, str4, fontWeight2, num3, num4, horizontalAlignment2, size2, padding3, (i6 & 2048) == 0 ? padding2 : null, null);
    }
}
