package com.revenuecat.purchases.paywalls.components;

import W.b;
import androidx.media3.extractor.text.ttml.TtmlNode;
import com.revenuecat.purchases.paywalls.components.CountdownComponent;
import g5.a;
import i5.g;
import j5.c;
import j5.d;
import k5.A;
import k5.P;
import k5.S;
import k5.a0;
import kotlin.jvm.internal.o;
import w4.InterfaceC3141c;

/* JADX INFO: loaded from: classes3.dex */
@InterfaceC3141c
public final class CountdownComponent$$serializer implements A {
    public static final CountdownComponent$$serializer INSTANCE;
    private static final /* synthetic */ S descriptor;

    static {
        CountdownComponent$$serializer countdownComponent$$serializer = new CountdownComponent$$serializer();
        INSTANCE = countdownComponent$$serializer;
        S s6 = new S("countdown", countdownComponent$$serializer, 5);
        s6.k(TtmlNode.TAG_STYLE, false);
        s6.k("count_from", true);
        s6.k("countdown_stack", false);
        s6.k("end_stack", true);
        s6.k("fallback", true);
        descriptor = s6;
    }

    private CountdownComponent$$serializer() {
    }

    @Override // k5.A
    public a[] childSerializers() {
        a aVar = CountdownComponent.$childSerializers[1];
        StackComponent$$serializer stackComponent$$serializer = StackComponent$$serializer.INSTANCE;
        return new a[]{CountdownComponent$CountdownStyle$$serializer.INSTANCE, aVar, stackComponent$$serializer, b.h0(stackComponent$$serializer), b.h0(stackComponent$$serializer)};
    }

    @Override // g5.a
    public CountdownComponent deserialize(c decoder) {
        o.h(decoder, "decoder");
        g descriptor2 = getDescriptor();
        j5.a aVarB = decoder.b(descriptor2);
        a[] aVarArr = CountdownComponent.$childSerializers;
        int i6 = 0;
        CountdownComponent.CountdownStyle countdownStyle = null;
        CountdownComponent.CountFrom countFrom = null;
        StackComponent stackComponent = null;
        StackComponent stackComponent2 = null;
        StackComponent stackComponent3 = null;
        boolean z6 = true;
        while (z6) {
            int iK = aVarB.k(descriptor2);
            if (iK == -1) {
                z6 = false;
            } else if (iK == 0) {
                countdownStyle = (CountdownComponent.CountdownStyle) aVarB.p(descriptor2, 0, CountdownComponent$CountdownStyle$$serializer.INSTANCE, countdownStyle);
                i6 |= 1;
            } else if (iK == 1) {
                countFrom = (CountdownComponent.CountFrom) aVarB.p(descriptor2, 1, aVarArr[1], countFrom);
                i6 |= 2;
            } else if (iK == 2) {
                stackComponent = (StackComponent) aVarB.p(descriptor2, 2, StackComponent$$serializer.INSTANCE, stackComponent);
                i6 |= 4;
            } else if (iK == 3) {
                stackComponent2 = (StackComponent) aVarB.r(descriptor2, 3, StackComponent$$serializer.INSTANCE, stackComponent2);
                i6 |= 8;
            } else {
                if (iK != 4) {
                    throw new g5.g(iK);
                }
                stackComponent3 = (StackComponent) aVarB.r(descriptor2, 4, StackComponent$$serializer.INSTANCE, stackComponent3);
                i6 |= 16;
            }
        }
        aVarB.c(descriptor2);
        return new CountdownComponent(i6, countdownStyle, countFrom, stackComponent, stackComponent2, stackComponent3, (a0) null);
    }

    @Override // g5.a
    public g getDescriptor() {
        return descriptor;
    }

    @Override // g5.a
    public void serialize(d encoder, CountdownComponent value) {
        o.h(encoder, "encoder");
        o.h(value, "value");
        g descriptor2 = getDescriptor();
        j5.b bVarB = encoder.b(descriptor2);
        CountdownComponent.write$Self$purchases_defaultsBc8Release(value, bVarB, descriptor2);
        bVarB.c(descriptor2);
    }

    @Override // k5.A
    public a[] typeParametersSerializers() {
        return P.f20015b;
    }
}
