package com.revenuecat.purchases.paywalls.components;

import Q4.c;
import androidx.compose.runtime.Immutable;
import com.revenuecat.purchases.InternalRevenueCatAPI;
import com.revenuecat.purchases.paywalls.components.common.Background;
import com.revenuecat.purchases.paywalls.components.common.BackgroundDeserializer;
import com.revenuecat.purchases.paywalls.components.common.ComponentOverride;
import com.revenuecat.purchases.paywalls.components.properties.Badge;
import com.revenuecat.purchases.paywalls.components.properties.Badge$$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.Dimension;
import com.revenuecat.purchases.paywalls.components.properties.Dimension$Horizontal$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.Dimension$Vertical$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.Dimension$ZLayer$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.FlexDistribution;
import com.revenuecat.purchases.paywalls.components.properties.HorizontalAlignment;
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.Shape;
import com.revenuecat.purchases.paywalls.components.properties.ShapeDeserializer;
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 g5.e;
import i5.g;
import j5.b;
import java.lang.annotation.Annotation;
import java.util.List;
import k5.C2416d;
import k5.C2419g;
import k5.C2437z;
import k5.P;
import k5.a0;
import kotlin.jvm.internal.D;
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 StackComponent implements PaywallComponent {
    private final Background background;
    private final ColorScheme backgroundColor;
    private final Badge badge;
    private final Border border;
    private final List<PaywallComponent> components;
    private final Dimension dimension;
    private final Padding margin;
    private final Overflow overflow;
    private final List<ComponentOverride<PartialStackComponent>> overrides;
    private final Padding padding;
    private final Shadow shadow;
    private final Shape shape;
    private final Size size;
    private final Float spacing;
    private final Boolean visible;
    public static final Companion Companion = new Companion(null);
    private static final a[] $childSerializers = {new C2416d(new PaywallComponentSerializer()), null, new e("com.revenuecat.purchases.paywalls.components.properties.Dimension", D.a(Dimension.class), new c[]{D.a(Dimension.Horizontal.class), D.a(Dimension.Vertical.class), D.a(Dimension.ZLayer.class)}, new a[]{Dimension$Horizontal$$serializer.INSTANCE, Dimension$Vertical$$serializer.INSTANCE, Dimension$ZLayer$$serializer.INSTANCE}, new Annotation[0]), null, null, null, null, null, null, null, null, null, null, null, new C2416d(ComponentOverride.Companion.serializer(PartialStackComponent$$serializer.INSTANCE))};

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

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

        private Companion() {
        }
    }

    public enum Overflow {
        NONE,
        SCROLL;

        public static final Companion Companion = new Companion(null);

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

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

            private Companion() {
            }
        }
    }

    @InterfaceC3141c
    public /* synthetic */ StackComponent(int i6, List list, Boolean bool, Dimension dimension, Size size, Float f6, ColorScheme colorScheme, Background background, Padding padding, Padding padding2, Shape shape, Border border, Shadow shadow, Badge badge, Overflow overflow, List list2, a0 a0Var) {
        if (1 != (i6 & 1)) {
            P.h(i6, 1, StackComponent$$serializer.INSTANCE.getDescriptor());
            throw null;
        }
        this.components = list;
        if ((i6 & 2) == 0) {
            this.visible = null;
        } else {
            this.visible = bool;
        }
        if ((i6 & 4) == 0) {
            this.dimension = new Dimension.Vertical(HorizontalAlignment.CENTER, FlexDistribution.START);
        } else {
            this.dimension = dimension;
        }
        if ((i6 & 8) == 0) {
            this.size = new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE);
        } else {
            this.size = size;
        }
        if ((i6 & 16) == 0) {
            this.spacing = null;
        } else {
            this.spacing = f6;
        }
        if ((i6 & 32) == 0) {
            this.backgroundColor = null;
        } else {
            this.backgroundColor = colorScheme;
        }
        if ((i6 & 64) == 0) {
            this.background = null;
        } else {
            this.background = background;
        }
        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.shape = null;
        } else {
            this.shape = shape;
        }
        if ((i6 & 1024) == 0) {
            this.border = null;
        } else {
            this.border = border;
        }
        if ((i6 & 2048) == 0) {
            this.shadow = null;
        } else {
            this.shadow = shadow;
        }
        if ((i6 & 4096) == 0) {
            this.badge = null;
        } else {
            this.badge = badge;
        }
        if ((i6 & 8192) == 0) {
            this.overflow = null;
        } else {
            this.overflow = overflow;
        }
        this.overrides = (i6 & 16384) == 0 ? y.f26065a : list2;
    }

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

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(StackComponent stackComponent, b bVar, g gVar) {
        a[] aVarArr = $childSerializers;
        bVar.z(gVar, 0, aVarArr[0], stackComponent.components);
        if (bVar.g(gVar) || stackComponent.visible != null) {
            bVar.E(gVar, 1, C2419g.f20053a, stackComponent.visible);
        }
        if (bVar.g(gVar) || !o.c(stackComponent.dimension, new Dimension.Vertical(HorizontalAlignment.CENTER, FlexDistribution.START))) {
            bVar.z(gVar, 2, aVarArr[2], stackComponent.dimension);
        }
        if (bVar.g(gVar) || !o.c(stackComponent.size, new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE))) {
            bVar.z(gVar, 3, Size$$serializer.INSTANCE, stackComponent.size);
        }
        if (bVar.g(gVar) || stackComponent.spacing != null) {
            bVar.E(gVar, 4, C2437z.f20111a, stackComponent.spacing);
        }
        if (bVar.g(gVar) || stackComponent.backgroundColor != null) {
            bVar.E(gVar, 5, ColorScheme$$serializer.INSTANCE, stackComponent.backgroundColor);
        }
        if (bVar.g(gVar) || stackComponent.background != null) {
            bVar.E(gVar, 6, BackgroundDeserializer.INSTANCE, stackComponent.background);
        }
        if (bVar.g(gVar) || !o.c(stackComponent.padding, Padding.Companion.getZero())) {
            bVar.z(gVar, 7, Padding$$serializer.INSTANCE, stackComponent.padding);
        }
        if (bVar.g(gVar) || !o.c(stackComponent.margin, Padding.Companion.getZero())) {
            bVar.z(gVar, 8, Padding$$serializer.INSTANCE, stackComponent.margin);
        }
        if (bVar.g(gVar) || stackComponent.shape != null) {
            bVar.E(gVar, 9, ShapeDeserializer.INSTANCE, stackComponent.shape);
        }
        if (bVar.g(gVar) || stackComponent.border != null) {
            bVar.E(gVar, 10, Border$$serializer.INSTANCE, stackComponent.border);
        }
        if (bVar.g(gVar) || stackComponent.shadow != null) {
            bVar.E(gVar, 11, Shadow$$serializer.INSTANCE, stackComponent.shadow);
        }
        if (bVar.g(gVar) || stackComponent.badge != null) {
            bVar.E(gVar, 12, Badge$$serializer.INSTANCE, stackComponent.badge);
        }
        if (bVar.g(gVar) || stackComponent.overflow != null) {
            bVar.E(gVar, 13, StackOverflowDeserializer.INSTANCE, stackComponent.overflow);
        }
        if (!bVar.g(gVar) && o.c(stackComponent.overrides, y.f26065a)) {
            return;
        }
        bVar.z(gVar, 14, aVarArr[14], stackComponent.overrides);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof StackComponent)) {
            return false;
        }
        StackComponent stackComponent = (StackComponent) obj;
        return o.c(this.components, stackComponent.components) && o.c(this.visible, stackComponent.visible) && o.c(this.dimension, stackComponent.dimension) && o.c(this.size, stackComponent.size) && o.c(this.spacing, stackComponent.spacing) && o.c(this.backgroundColor, stackComponent.backgroundColor) && o.c(this.background, stackComponent.background) && o.c(this.padding, stackComponent.padding) && o.c(this.margin, stackComponent.margin) && o.c(this.shape, stackComponent.shape) && o.c(this.border, stackComponent.border) && o.c(this.shadow, stackComponent.shadow) && o.c(this.badge, stackComponent.badge) && this.overflow == stackComponent.overflow && o.c(this.overrides, stackComponent.overrides);
    }

    public final /* synthetic */ Background getBackground() {
        return this.background;
    }

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

    public final /* synthetic */ Badge getBadge() {
        return this.badge;
    }

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

    public final /* synthetic */ List getComponents() {
        return this.components;
    }

    public final /* synthetic */ Dimension getDimension() {
        return this.dimension;
    }

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

    public final /* synthetic */ Overflow getOverflow() {
        return this.overflow;
    }

    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 */ Shape getShape() {
        return this.shape;
    }

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

    public final /* synthetic */ Float getSpacing() {
        return this.spacing;
    }

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

    public int hashCode() {
        int iHashCode = this.components.hashCode() * 31;
        Boolean bool = this.visible;
        int iHashCode2 = (this.size.hashCode() + ((this.dimension.hashCode() + ((iHashCode + (bool == null ? 0 : bool.hashCode())) * 31)) * 31)) * 31;
        Float f6 = this.spacing;
        int iHashCode3 = (iHashCode2 + (f6 == null ? 0 : f6.hashCode())) * 31;
        ColorScheme colorScheme = this.backgroundColor;
        int iHashCode4 = (iHashCode3 + (colorScheme == null ? 0 : colorScheme.hashCode())) * 31;
        Background background = this.background;
        int iHashCode5 = (this.margin.hashCode() + ((this.padding.hashCode() + ((iHashCode4 + (background == null ? 0 : background.hashCode())) * 31)) * 31)) * 31;
        Shape shape = this.shape;
        int iHashCode6 = (iHashCode5 + (shape == null ? 0 : shape.hashCode())) * 31;
        Border border = this.border;
        int iHashCode7 = (iHashCode6 + (border == null ? 0 : border.hashCode())) * 31;
        Shadow shadow = this.shadow;
        int iHashCode8 = (iHashCode7 + (shadow == null ? 0 : shadow.hashCode())) * 31;
        Badge badge = this.badge;
        int iHashCode9 = (iHashCode8 + (badge == null ? 0 : badge.hashCode())) * 31;
        Overflow overflow = this.overflow;
        return this.overrides.hashCode() + ((iHashCode9 + (overflow != null ? overflow.hashCode() : 0)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("StackComponent(components=");
        sb.append(this.components);
        sb.append(", visible=");
        sb.append(this.visible);
        sb.append(", dimension=");
        sb.append(this.dimension);
        sb.append(", size=");
        sb.append(this.size);
        sb.append(", spacing=");
        sb.append(this.spacing);
        sb.append(", backgroundColor=");
        sb.append(this.backgroundColor);
        sb.append(", background=");
        sb.append(this.background);
        sb.append(", padding=");
        sb.append(this.padding);
        sb.append(", margin=");
        sb.append(this.margin);
        sb.append(", shape=");
        sb.append(this.shape);
        sb.append(", border=");
        sb.append(this.border);
        sb.append(", shadow=");
        sb.append(this.shadow);
        sb.append(", badge=");
        sb.append(this.badge);
        sb.append(", overflow=");
        sb.append(this.overflow);
        sb.append(", overrides=");
        return A0.a.o(sb, this.overrides, ')');
    }

    /* JADX WARN: Multi-variable type inference failed */
    public StackComponent(List<? extends PaywallComponent> components, Boolean bool, Dimension dimension, Size size, Float f6, ColorScheme colorScheme, Background background, Padding padding, Padding margin, Shape shape, Border border, Shadow shadow, Badge badge, Overflow overflow, List<ComponentOverride<PartialStackComponent>> overrides) {
        o.h(components, "components");
        o.h(dimension, "dimension");
        o.h(size, "size");
        o.h(padding, "padding");
        o.h(margin, "margin");
        o.h(overrides, "overrides");
        this.components = components;
        this.visible = bool;
        this.dimension = dimension;
        this.size = size;
        this.spacing = f6;
        this.backgroundColor = colorScheme;
        this.background = background;
        this.padding = padding;
        this.margin = margin;
        this.shape = shape;
        this.border = border;
        this.shadow = shadow;
        this.badge = badge;
        this.overflow = overflow;
        this.overrides = overrides;
    }

    public /* synthetic */ StackComponent(List list, Boolean bool, Dimension dimension, Size size, Float f6, ColorScheme colorScheme, Background background, Padding padding, Padding padding2, Shape shape, Border border, Shadow shadow, Badge badge, Overflow overflow, List list2, int i6, h hVar) {
        this(list, (i6 & 2) != 0 ? null : bool, (i6 & 4) != 0 ? new Dimension.Vertical(HorizontalAlignment.CENTER, FlexDistribution.START) : dimension, (i6 & 8) != 0 ? new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE) : size, (i6 & 16) != 0 ? null : f6, (i6 & 32) != 0 ? null : colorScheme, (i6 & 64) != 0 ? null : background, (i6 & 128) != 0 ? Padding.Companion.getZero() : padding, (i6 & 256) != 0 ? Padding.Companion.getZero() : padding2, (i6 & 512) != 0 ? null : shape, (i6 & 1024) != 0 ? null : border, (i6 & 2048) != 0 ? null : shadow, (i6 & 4096) != 0 ? null : badge, (i6 & 8192) == 0 ? overflow : null, (i6 & 16384) != 0 ? y.f26065a : list2);
    }
}
