package com.revenuecat.purchases.paywalls.components;

import W.b;
import com.revenuecat.purchases.paywalls.components.PurchaseButtonComponent;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey$$serializer;
import g5.a;
import i5.g;
import j5.c;
import j5.d;
import k5.A;
import k5.P;
import k5.S;
import k5.e0;
import kotlin.jvm.internal.o;
import w4.InterfaceC3141c;

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

    static {
        PurchaseButtonComponent$CustomUrl$$serializer purchaseButtonComponent$CustomUrl$$serializer = new PurchaseButtonComponent$CustomUrl$$serializer();
        INSTANCE = purchaseButtonComponent$CustomUrl$$serializer;
        S s6 = new S("com.revenuecat.purchases.paywalls.components.PurchaseButtonComponent.CustomUrl", purchaseButtonComponent$CustomUrl$$serializer, 2);
        s6.k("url_lid", false);
        s6.k("package_param", true);
        descriptor = s6;
    }

    private PurchaseButtonComponent$CustomUrl$$serializer() {
    }

    @Override // k5.A
    public a[] childSerializers() {
        return new a[]{LocalizationKey$$serializer.INSTANCE, b.h0(e0.f20048a)};
    }

    @Override // g5.a
    public PurchaseButtonComponent.CustomUrl deserialize(c decoder) {
        o.h(decoder, "decoder");
        g descriptor2 = getDescriptor();
        j5.a aVarB = decoder.b(descriptor2);
        boolean z6 = true;
        int i6 = 0;
        String strM613unboximpl = null;
        String str = null;
        while (z6) {
            int iK = aVarB.k(descriptor2);
            if (iK == -1) {
                z6 = false;
            } else if (iK == 0) {
                LocalizationKey localizationKey = (LocalizationKey) aVarB.p(descriptor2, 0, LocalizationKey$$serializer.INSTANCE, strM613unboximpl != null ? LocalizationKey.m607boximpl(strM613unboximpl) : null);
                strM613unboximpl = localizationKey != null ? localizationKey.m613unboximpl() : null;
                i6 |= 1;
            } else {
                if (iK != 1) {
                    throw new g5.g(iK);
                }
                str = (String) aVarB.r(descriptor2, 1, e0.f20048a, str);
                i6 |= 2;
            }
        }
        aVarB.c(descriptor2);
        return new PurchaseButtonComponent.CustomUrl(i6, strM613unboximpl, str, null, null);
    }

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

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

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