package com.revenuecat.purchases.paywalls.components;

import androidx.compose.runtime.Immutable;
import com.revenuecat.purchases.InternalRevenueCatAPI;
import com.revenuecat.purchases.utils.serializers.ISO8601DateSerializer;
import g5.a;
import j5.b;
import java.lang.annotation.Annotation;
import java.util.Date;
import k5.P;
import k5.a0;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import m1.g;
import w4.InterfaceC3141c;
import w4.i;

/* JADX INFO: loaded from: classes3.dex */
@Immutable
@InternalRevenueCatAPI
public final class CountdownComponent implements PaywallComponent {
    private final CountFrom countFrom;
    private final StackComponent countdownStack;
    private final StackComponent endStack;
    private final StackComponent fallback;
    private final CountdownStyle style;
    public static final Companion Companion = new Companion(null);
    private static final a[] $childSerializers = {null, CountFrom.Companion.serializer(), null, null, null};

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

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

        private Companion() {
        }
    }

    @InternalRevenueCatAPI
    public enum CountFrom {
        DAYS,
        HOURS,
        MINUTES;

        public static final Companion Companion = new Companion(null);
        private static final w4.h $cachedSerializer$delegate = g.j(i.f25466b, Companion.AnonymousClass1.INSTANCE);

        public static final class Companion {

            /* JADX INFO: renamed from: com.revenuecat.purchases.paywalls.components.CountdownComponent$CountFrom$Companion$1, reason: invalid class name */
            public static final class AnonymousClass1 extends p implements J4.a {
                public static final AnonymousClass1 INSTANCE = new AnonymousClass1();

                public AnonymousClass1() {
                    super(0);
                }

                @Override // J4.a
                public final a invoke() {
                    return P.d("com.revenuecat.purchases.paywalls.components.CountdownComponent.CountFrom", CountFrom.values(), new String[]{"days", "hours", "minutes"}, new Annotation[][]{null, null, null});
                }
            }

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

            private final /* synthetic */ a get$cachedSerializer() {
                return (a) CountFrom.$cachedSerializer$delegate.getValue();
            }

            public final a serializer() {
                return get$cachedSerializer();
            }

            private Companion() {
            }
        }
    }

    @InternalRevenueCatAPI
    @Immutable
    public static final class CountdownStyle {
        public static final Companion Companion = new Companion(null);
        private final Date date;
        private final String type;

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

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

            private Companion() {
            }
        }

        @InterfaceC3141c
        public /* synthetic */ CountdownStyle(int i6, String str, Date date, a0 a0Var) {
            if (3 != (i6 & 3)) {
                P.h(i6, 3, CountdownComponent$CountdownStyle$$serializer.INSTANCE.getDescriptor());
                throw null;
            }
            this.type = str;
            this.date = date;
        }

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

        public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(CountdownStyle countdownStyle, b bVar, i5.g gVar) {
            bVar.A(gVar, 0, countdownStyle.type);
            bVar.z(gVar, 1, ISO8601DateSerializer.INSTANCE, countdownStyle.date);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof CountdownStyle)) {
                return false;
            }
            CountdownStyle countdownStyle = (CountdownStyle) obj;
            return o.c(this.type, countdownStyle.type) && o.c(this.date, countdownStyle.date);
        }

        public final /* synthetic */ Date getDate() {
            return this.date;
        }

        public final /* synthetic */ String getType() {
            return this.type;
        }

        public int hashCode() {
            return this.date.hashCode() + (this.type.hashCode() * 31);
        }

        public String toString() {
            return "CountdownStyle(type=" + this.type + ", date=" + this.date + ')';
        }

        public CountdownStyle(String type, Date date) {
            o.h(type, "type");
            o.h(date, "date");
            this.type = type;
            this.date = date;
        }
    }

    @InterfaceC3141c
    public /* synthetic */ CountdownComponent(int i6, CountdownStyle countdownStyle, CountFrom countFrom, StackComponent stackComponent, StackComponent stackComponent2, StackComponent stackComponent3, a0 a0Var) {
        if (5 != (i6 & 5)) {
            P.h(i6, 5, CountdownComponent$$serializer.INSTANCE.getDescriptor());
            throw null;
        }
        this.style = countdownStyle;
        if ((i6 & 2) == 0) {
            this.countFrom = CountFrom.DAYS;
        } else {
            this.countFrom = countFrom;
        }
        this.countdownStack = stackComponent;
        if ((i6 & 8) == 0) {
            this.endStack = null;
        } else {
            this.endStack = stackComponent2;
        }
        if ((i6 & 16) == 0) {
            this.fallback = null;
        } else {
            this.fallback = stackComponent3;
        }
    }

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

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

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

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(CountdownComponent countdownComponent, b bVar, i5.g gVar) {
        a[] aVarArr = $childSerializers;
        bVar.z(gVar, 0, CountdownComponent$CountdownStyle$$serializer.INSTANCE, countdownComponent.style);
        if (bVar.g(gVar) || countdownComponent.countFrom != CountFrom.DAYS) {
            bVar.z(gVar, 1, aVarArr[1], countdownComponent.countFrom);
        }
        StackComponent$$serializer stackComponent$$serializer = StackComponent$$serializer.INSTANCE;
        bVar.z(gVar, 2, stackComponent$$serializer, countdownComponent.countdownStack);
        if (bVar.g(gVar) || countdownComponent.endStack != null) {
            bVar.E(gVar, 3, stackComponent$$serializer, countdownComponent.endStack);
        }
        if (!bVar.g(gVar) && countdownComponent.fallback == null) {
            return;
        }
        bVar.E(gVar, 4, stackComponent$$serializer, countdownComponent.fallback);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof CountdownComponent)) {
            return false;
        }
        CountdownComponent countdownComponent = (CountdownComponent) obj;
        return o.c(this.style, countdownComponent.style) && this.countFrom == countdownComponent.countFrom && o.c(this.countdownStack, countdownComponent.countdownStack) && o.c(this.endStack, countdownComponent.endStack) && o.c(this.fallback, countdownComponent.fallback);
    }

    public final /* synthetic */ CountFrom getCountFrom() {
        return this.countFrom;
    }

    public final /* synthetic */ StackComponent getCountdownStack() {
        return this.countdownStack;
    }

    public final /* synthetic */ StackComponent getEndStack() {
        return this.endStack;
    }

    public final /* synthetic */ StackComponent getFallback() {
        return this.fallback;
    }

    public final /* synthetic */ CountdownStyle getStyle() {
        return this.style;
    }

    public int hashCode() {
        int iHashCode = (this.countdownStack.hashCode() + ((this.countFrom.hashCode() + (this.style.hashCode() * 31)) * 31)) * 31;
        StackComponent stackComponent = this.endStack;
        int iHashCode2 = (iHashCode + (stackComponent == null ? 0 : stackComponent.hashCode())) * 31;
        StackComponent stackComponent2 = this.fallback;
        return iHashCode2 + (stackComponent2 != null ? stackComponent2.hashCode() : 0);
    }

    public String toString() {
        return "CountdownComponent(style=" + this.style + ", countFrom=" + this.countFrom + ", countdownStack=" + this.countdownStack + ", endStack=" + this.endStack + ", fallback=" + this.fallback + ')';
    }

    public CountdownComponent(CountdownStyle style, CountFrom countFrom, StackComponent countdownStack, StackComponent stackComponent, StackComponent stackComponent2) {
        o.h(style, "style");
        o.h(countFrom, "countFrom");
        o.h(countdownStack, "countdownStack");
        this.style = style;
        this.countFrom = countFrom;
        this.countdownStack = countdownStack;
        this.endStack = stackComponent;
        this.fallback = stackComponent2;
    }

    public /* synthetic */ CountdownComponent(CountdownStyle countdownStyle, CountFrom countFrom, StackComponent stackComponent, StackComponent stackComponent2, StackComponent stackComponent3, int i6, h hVar) {
        this(countdownStyle, (i6 & 2) != 0 ? CountFrom.DAYS : countFrom, stackComponent, (i6 & 8) != 0 ? null : stackComponent2, (i6 & 16) != 0 ? null : stackComponent3);
    }
}
