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.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.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.P;
import k5.a0;
import k5.e0;
import kotlin.jvm.internal.D;
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 TabsComponent implements PaywallComponent {
    private final Background background;
    private final ColorScheme backgroundColor;
    private final Border border;
    private final TabControl control;
    private final String defaultTabId;
    private final Padding margin;
    private final List<ComponentOverride<PartialTabsComponent>> overrides;
    private final Padding padding;
    private final Shadow shadow;
    private final Shape shape;
    private final Size size;
    private final List<Tab> tabs;
    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 e("com.revenuecat.purchases.paywalls.components.TabsComponent.TabControl", D.a(TabControl.class), new c[]{D.a(TabControl.Buttons.class), D.a(TabControl.Toggle.class)}, new a[]{TabsComponent$TabControl$Buttons$$serializer.INSTANCE, TabsComponent$TabControl$Toggle$$serializer.INSTANCE}, new Annotation[0]), new C2416d(TabsComponent$Tab$$serializer.INSTANCE), null, new C2416d(ComponentOverride.Companion.serializer(PartialTabsComponent$$serializer.INSTANCE))};

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

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

        private Companion() {
        }
    }

    @InternalRevenueCatAPI
    public static final class Tab {
        public static final Companion Companion = new Companion(null);
        private final String id;
        private final StackComponent stack;

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

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

            private Companion() {
            }
        }

        @InterfaceC3141c
        public /* synthetic */ Tab(int i6, String str, StackComponent stackComponent, a0 a0Var) {
            if (3 != (i6 & 3)) {
                P.h(i6, 3, TabsComponent$Tab$$serializer.INSTANCE.getDescriptor());
                throw null;
            }
            this.id = str;
            this.stack = stackComponent;
        }

        public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(Tab tab, b bVar, g gVar) {
            bVar.A(gVar, 0, tab.id);
            bVar.z(gVar, 1, StackComponent$$serializer.INSTANCE, tab.stack);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof Tab)) {
                return false;
            }
            Tab tab = (Tab) obj;
            return o.c(this.id, tab.id) && o.c(this.stack, tab.stack);
        }

        public final /* synthetic */ String getId() {
            return this.id;
        }

        public final /* synthetic */ StackComponent getStack() {
            return this.stack;
        }

        public int hashCode() {
            return this.stack.hashCode() + (this.id.hashCode() * 31);
        }

        public String toString() {
            return "Tab(id=" + this.id + ", stack=" + this.stack + ')';
        }

        public Tab(String id, StackComponent stack) {
            o.h(id, "id");
            o.h(stack, "stack");
            this.id = id;
            this.stack = stack;
        }
    }

    @InternalRevenueCatAPI
    public interface TabControl {
        public static final Companion Companion = Companion.$$INSTANCE;

        @InternalRevenueCatAPI
        public static final class Buttons implements TabControl {
            public static final Companion Companion = new Companion(null);
            private final StackComponent stack;

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

                public final a serializer() {
                    return TabsComponent$TabControl$Buttons$$serializer.INSTANCE;
                }

                private Companion() {
                }
            }

            @InterfaceC3141c
            public /* synthetic */ Buttons(int i6, StackComponent stackComponent, a0 a0Var) {
                if (1 == (i6 & 1)) {
                    this.stack = stackComponent;
                } else {
                    P.h(i6, 1, TabsComponent$TabControl$Buttons$$serializer.INSTANCE.getDescriptor());
                    throw null;
                }
            }

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

            public final /* synthetic */ StackComponent getStack() {
                return this.stack;
            }

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

            public String toString() {
                return "Buttons(stack=" + this.stack + ')';
            }

            public Buttons(StackComponent stack) {
                o.h(stack, "stack");
                this.stack = stack;
            }
        }

        public static final class Companion {
            static final /* synthetic */ Companion $$INSTANCE = new Companion();

            private Companion() {
            }

            public final a serializer() {
                return new e("com.revenuecat.purchases.paywalls.components.TabsComponent.TabControl", D.a(TabControl.class), new c[]{D.a(Buttons.class), D.a(Toggle.class)}, new a[]{TabsComponent$TabControl$Buttons$$serializer.INSTANCE, TabsComponent$TabControl$Toggle$$serializer.INSTANCE}, new Annotation[0]);
            }
        }

        @InternalRevenueCatAPI
        public static final class Toggle implements TabControl {
            public static final Companion Companion = new Companion(null);
            private final StackComponent stack;

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

                public final a serializer() {
                    return TabsComponent$TabControl$Toggle$$serializer.INSTANCE;
                }

                private Companion() {
                }
            }

            @InterfaceC3141c
            public /* synthetic */ Toggle(int i6, StackComponent stackComponent, a0 a0Var) {
                if (1 == (i6 & 1)) {
                    this.stack = stackComponent;
                } else {
                    P.h(i6, 1, TabsComponent$TabControl$Toggle$$serializer.INSTANCE.getDescriptor());
                    throw null;
                }
            }

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

            public final /* synthetic */ StackComponent getStack() {
                return this.stack;
            }

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

            public String toString() {
                return "Toggle(stack=" + this.stack + ')';
            }

            public Toggle(StackComponent stack) {
                o.h(stack, "stack");
                this.stack = stack;
            }
        }
    }

    @InterfaceC3141c
    public /* synthetic */ TabsComponent(int i6, Boolean bool, Size size, Padding padding, Padding padding2, ColorScheme colorScheme, Background background, Shape shape, Border border, Shadow shadow, TabControl tabControl, List list, String str, List list2, a0 a0Var) {
        if (1536 != (i6 & 1536)) {
            P.h(i6, 1536, TabsComponent$$serializer.INSTANCE.getDescriptor());
            throw null;
        }
        if ((i6 & 1) == 0) {
            this.visible = null;
        } else {
            this.visible = bool;
        }
        if ((i6 & 2) == 0) {
            this.size = new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE);
        } else {
            this.size = size;
        }
        if ((i6 & 4) == 0) {
            this.padding = Padding.Companion.getZero();
        } else {
            this.padding = padding;
        }
        if ((i6 & 8) == 0) {
            this.margin = Padding.Companion.getZero();
        } else {
            this.margin = padding2;
        }
        if ((i6 & 16) == 0) {
            this.backgroundColor = null;
        } else {
            this.backgroundColor = colorScheme;
        }
        if ((i6 & 32) == 0) {
            this.background = null;
        } else {
            this.background = background;
        }
        if ((i6 & 64) == 0) {
            this.shape = null;
        } else {
            this.shape = shape;
        }
        if ((i6 & 128) == 0) {
            this.border = null;
        } else {
            this.border = border;
        }
        if ((i6 & 256) == 0) {
            this.shadow = null;
        } else {
            this.shadow = shadow;
        }
        this.control = tabControl;
        this.tabs = list;
        if ((i6 & 2048) == 0) {
            this.defaultTabId = null;
        } else {
            this.defaultTabId = str;
        }
        this.overrides = (i6 & 4096) == 0 ? y.f26065a : list2;
    }

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

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

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(TabsComponent tabsComponent, b bVar, g gVar) {
        a[] aVarArr = $childSerializers;
        if (bVar.g(gVar) || tabsComponent.visible != null) {
            bVar.E(gVar, 0, C2419g.f20053a, tabsComponent.visible);
        }
        if (bVar.g(gVar) || !o.c(tabsComponent.size, new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE))) {
            bVar.z(gVar, 1, Size$$serializer.INSTANCE, tabsComponent.size);
        }
        if (bVar.g(gVar) || !o.c(tabsComponent.padding, Padding.Companion.getZero())) {
            bVar.z(gVar, 2, Padding$$serializer.INSTANCE, tabsComponent.padding);
        }
        if (bVar.g(gVar) || !o.c(tabsComponent.margin, Padding.Companion.getZero())) {
            bVar.z(gVar, 3, Padding$$serializer.INSTANCE, tabsComponent.margin);
        }
        if (bVar.g(gVar) || tabsComponent.backgroundColor != null) {
            bVar.E(gVar, 4, ColorScheme$$serializer.INSTANCE, tabsComponent.backgroundColor);
        }
        if (bVar.g(gVar) || tabsComponent.background != null) {
            bVar.E(gVar, 5, BackgroundDeserializer.INSTANCE, tabsComponent.background);
        }
        if (bVar.g(gVar) || tabsComponent.shape != null) {
            bVar.E(gVar, 6, ShapeDeserializer.INSTANCE, tabsComponent.shape);
        }
        if (bVar.g(gVar) || tabsComponent.border != null) {
            bVar.E(gVar, 7, Border$$serializer.INSTANCE, tabsComponent.border);
        }
        if (bVar.g(gVar) || tabsComponent.shadow != null) {
            bVar.E(gVar, 8, Shadow$$serializer.INSTANCE, tabsComponent.shadow);
        }
        bVar.z(gVar, 9, aVarArr[9], tabsComponent.control);
        bVar.z(gVar, 10, aVarArr[10], tabsComponent.tabs);
        if (bVar.g(gVar) || tabsComponent.defaultTabId != null) {
            bVar.E(gVar, 11, e0.f20048a, tabsComponent.defaultTabId);
        }
        if (!bVar.g(gVar) && o.c(tabsComponent.overrides, y.f26065a)) {
            return;
        }
        bVar.z(gVar, 12, aVarArr[12], tabsComponent.overrides);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof TabsComponent)) {
            return false;
        }
        TabsComponent tabsComponent = (TabsComponent) obj;
        return o.c(this.visible, tabsComponent.visible) && o.c(this.size, tabsComponent.size) && o.c(this.padding, tabsComponent.padding) && o.c(this.margin, tabsComponent.margin) && o.c(this.backgroundColor, tabsComponent.backgroundColor) && o.c(this.background, tabsComponent.background) && o.c(this.shape, tabsComponent.shape) && o.c(this.border, tabsComponent.border) && o.c(this.shadow, tabsComponent.shadow) && o.c(this.control, tabsComponent.control) && o.c(this.tabs, tabsComponent.tabs) && o.c(this.defaultTabId, tabsComponent.defaultTabId) && o.c(this.overrides, tabsComponent.overrides);
    }

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

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

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

    public final /* synthetic */ TabControl getControl() {
        return this.control;
    }

    public final /* synthetic */ String getDefaultTabId() {
        return this.defaultTabId;
    }

    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 */ Shadow getShadow() {
        return this.shadow;
    }

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

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

    public final /* synthetic */ List getTabs() {
        return this.tabs;
    }

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

    public int hashCode() {
        Boolean bool = this.visible;
        int iHashCode = (this.margin.hashCode() + ((this.padding.hashCode() + ((this.size.hashCode() + ((bool == null ? 0 : bool.hashCode()) * 31)) * 31)) * 31)) * 31;
        ColorScheme colorScheme = this.backgroundColor;
        int iHashCode2 = (iHashCode + (colorScheme == null ? 0 : colorScheme.hashCode())) * 31;
        Background background = this.background;
        int iHashCode3 = (iHashCode2 + (background == null ? 0 : background.hashCode())) * 31;
        Shape shape = this.shape;
        int iHashCode4 = (iHashCode3 + (shape == null ? 0 : shape.hashCode())) * 31;
        Border border = this.border;
        int iHashCode5 = (iHashCode4 + (border == null ? 0 : border.hashCode())) * 31;
        Shadow shadow = this.shadow;
        int iC = AbstractC2761L.c(this.tabs, (this.control.hashCode() + ((iHashCode5 + (shadow == null ? 0 : shadow.hashCode())) * 31)) * 31, 31);
        String str = this.defaultTabId;
        return this.overrides.hashCode() + ((iC + (str != null ? str.hashCode() : 0)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("TabsComponent(visible=");
        sb.append(this.visible);
        sb.append(", size=");
        sb.append(this.size);
        sb.append(", padding=");
        sb.append(this.padding);
        sb.append(", margin=");
        sb.append(this.margin);
        sb.append(", backgroundColor=");
        sb.append(this.backgroundColor);
        sb.append(", background=");
        sb.append(this.background);
        sb.append(", shape=");
        sb.append(this.shape);
        sb.append(", border=");
        sb.append(this.border);
        sb.append(", shadow=");
        sb.append(this.shadow);
        sb.append(", control=");
        sb.append(this.control);
        sb.append(", tabs=");
        sb.append(this.tabs);
        sb.append(", defaultTabId=");
        sb.append(this.defaultTabId);
        sb.append(", overrides=");
        return A0.a.o(sb, this.overrides, ')');
    }

    public TabsComponent(Boolean bool, Size size, Padding padding, Padding margin, ColorScheme colorScheme, Background background, Shape shape, Border border, Shadow shadow, TabControl control, List<Tab> tabs, String str, List<ComponentOverride<PartialTabsComponent>> overrides) {
        o.h(size, "size");
        o.h(padding, "padding");
        o.h(margin, "margin");
        o.h(control, "control");
        o.h(tabs, "tabs");
        o.h(overrides, "overrides");
        this.visible = bool;
        this.size = size;
        this.padding = padding;
        this.margin = margin;
        this.backgroundColor = colorScheme;
        this.background = background;
        this.shape = shape;
        this.border = border;
        this.shadow = shadow;
        this.control = control;
        this.tabs = tabs;
        this.defaultTabId = str;
        this.overrides = overrides;
    }

    public /* synthetic */ TabsComponent(Boolean bool, Size size, Padding padding, Padding padding2, ColorScheme colorScheme, Background background, Shape shape, Border border, Shadow shadow, TabControl tabControl, List list, String str, List list2, int i6, h hVar) {
        this((i6 & 1) != 0 ? null : bool, (i6 & 2) != 0 ? new Size(SizeConstraint.Fill.INSTANCE, SizeConstraint.Fit.INSTANCE) : size, (i6 & 4) != 0 ? Padding.Companion.getZero() : padding, (i6 & 8) != 0 ? Padding.Companion.getZero() : padding2, (i6 & 16) != 0 ? null : colorScheme, (i6 & 32) != 0 ? null : background, (i6 & 64) != 0 ? null : shape, (i6 & 128) != 0 ? null : border, (i6 & 256) != 0 ? null : shadow, tabControl, list, (i6 & 2048) != 0 ? null : str, (i6 & 4096) != 0 ? y.f26065a : list2);
    }
}
