package com.revenuecat.purchases.paywalls.components;

import W.b;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.exoplayer.DecoderReuseEvaluation;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey;
import com.revenuecat.purchases.paywalls.components.common.LocalizationKey$$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.FitMode;
import com.revenuecat.purchases.paywalls.components.properties.FitModeDeserializer;
import com.revenuecat.purchases.paywalls.components.properties.MaskShape;
import com.revenuecat.purchases.paywalls.components.properties.MaskShapeDeserializer;
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.Size;
import com.revenuecat.purchases.paywalls.components.properties.Size$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.ThemeImageUrls;
import com.revenuecat.purchases.paywalls.components.properties.ThemeImageUrls$$serializer;
import com.revenuecat.purchases.paywalls.components.properties.ThemeVideoUrls;
import com.revenuecat.purchases.paywalls.components.properties.ThemeVideoUrls$$serializer;
import g5.a;
import i5.g;
import j5.c;
import j5.d;
import java.util.List;
import k5.A;
import k5.C2419g;
import k5.P;
import k5.S;
import kotlin.jvm.internal.o;
import w4.InterfaceC3141c;

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

    static {
        VideoComponent$$serializer videoComponent$$serializer = new VideoComponent$$serializer();
        INSTANCE = videoComponent$$serializer;
        S s6 = new S(MimeTypes.BASE_TYPE_VIDEO, videoComponent$$serializer, 17);
        s6.k("source", false);
        s6.k("fallback_source", false);
        s6.k("visible", false);
        s6.k("show_controls", false);
        s6.k("auto_play", false);
        s6.k("loop", false);
        s6.k("mute_audio", false);
        s6.k("size", false);
        s6.k("fit_mode", false);
        s6.k("mask_shape", false);
        s6.k("color_overlay", false);
        s6.k("padding", false);
        s6.k("margin", false);
        s6.k("border", false);
        s6.k("shadow", false);
        s6.k("overrides", false);
        s6.k("override_source_lid", true);
        descriptor = s6;
    }

    private VideoComponent$$serializer() {
    }

    @Override // k5.A
    public a[] childSerializers() {
        a[] aVarArr = VideoComponent.$childSerializers;
        a aVarH0 = b.h0(ThemeImageUrls$$serializer.INSTANCE);
        C2419g c2419g = C2419g.f20053a;
        a aVarH02 = b.h0(c2419g);
        a aVarH03 = b.h0(MaskShapeDeserializer.INSTANCE);
        a aVarH04 = b.h0(ColorScheme$$serializer.INSTANCE);
        Padding$$serializer padding$$serializer = Padding$$serializer.INSTANCE;
        return new a[]{ThemeVideoUrls$$serializer.INSTANCE, aVarH0, aVarH02, c2419g, c2419g, c2419g, c2419g, Size$$serializer.INSTANCE, FitModeDeserializer.INSTANCE, aVarH03, aVarH04, b.h0(padding$$serializer), b.h0(padding$$serializer), b.h0(Border$$serializer.INSTANCE), b.h0(Shadow$$serializer.INSTANCE), b.h0(aVarArr[15]), b.h0(LocalizationKey$$serializer.INSTANCE)};
    }

    @Override // g5.a
    public VideoComponent deserialize(c decoder) {
        ThemeVideoUrls themeVideoUrls;
        LocalizationKey localizationKeyM607boximpl;
        List list;
        ThemeVideoUrls themeVideoUrls2;
        o.h(decoder, "decoder");
        g descriptor2 = getDescriptor();
        j5.a aVarB = decoder.b(descriptor2);
        a[] aVarArr = VideoComponent.$childSerializers;
        List list2 = null;
        Shadow shadow = null;
        Border border = null;
        Padding padding = null;
        boolean z6 = true;
        Size size = null;
        int i6 = 0;
        ThemeVideoUrls themeVideoUrls3 = null;
        ThemeImageUrls themeImageUrls = null;
        Boolean bool = null;
        FitMode fitMode = null;
        MaskShape maskShape = null;
        ColorScheme colorScheme = null;
        Padding padding2 = null;
        boolean zX = false;
        boolean zX2 = false;
        boolean zX3 = false;
        boolean zX4 = false;
        String strM613unboximpl = null;
        while (z6) {
            boolean z7 = z6;
            int iK = aVarB.k(descriptor2);
            switch (iK) {
                case -1:
                    list = list2;
                    z6 = false;
                    themeVideoUrls3 = themeVideoUrls3;
                    list2 = list;
                    break;
                case 0:
                    list = list2;
                    i6 |= 1;
                    themeVideoUrls3 = (ThemeVideoUrls) aVarB.p(descriptor2, 0, ThemeVideoUrls$$serializer.INSTANCE, themeVideoUrls3);
                    z6 = z7;
                    list2 = list;
                    break;
                case 1:
                    themeVideoUrls2 = themeVideoUrls3;
                    themeImageUrls = (ThemeImageUrls) aVarB.r(descriptor2, 1, ThemeImageUrls$$serializer.INSTANCE, themeImageUrls);
                    i6 |= 2;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 2:
                    themeVideoUrls2 = themeVideoUrls3;
                    bool = (Boolean) aVarB.r(descriptor2, 2, C2419g.f20053a, bool);
                    i6 |= 4;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 3:
                    zX = aVarB.x(descriptor2, 3);
                    i6 |= 8;
                    z6 = z7;
                    break;
                case 4:
                    zX2 = aVarB.x(descriptor2, 4);
                    i6 |= 16;
                    z6 = z7;
                    break;
                case 5:
                    zX3 = aVarB.x(descriptor2, 5);
                    i6 |= 32;
                    z6 = z7;
                    break;
                case 6:
                    zX4 = aVarB.x(descriptor2, 6);
                    i6 |= 64;
                    z6 = z7;
                    break;
                case 7:
                    themeVideoUrls2 = themeVideoUrls3;
                    size = (Size) aVarB.p(descriptor2, 7, Size$$serializer.INSTANCE, size);
                    i6 |= 128;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 8:
                    themeVideoUrls2 = themeVideoUrls3;
                    fitMode = (FitMode) aVarB.p(descriptor2, 8, FitModeDeserializer.INSTANCE, fitMode);
                    i6 |= 256;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 9:
                    themeVideoUrls2 = themeVideoUrls3;
                    maskShape = (MaskShape) aVarB.r(descriptor2, 9, MaskShapeDeserializer.INSTANCE, maskShape);
                    i6 |= 512;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 10:
                    themeVideoUrls2 = themeVideoUrls3;
                    colorScheme = (ColorScheme) aVarB.r(descriptor2, 10, ColorScheme$$serializer.INSTANCE, colorScheme);
                    i6 |= 1024;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 11:
                    themeVideoUrls2 = themeVideoUrls3;
                    padding2 = (Padding) aVarB.r(descriptor2, 11, Padding$$serializer.INSTANCE, padding2);
                    i6 |= 2048;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 12:
                    themeVideoUrls2 = themeVideoUrls3;
                    padding = (Padding) aVarB.r(descriptor2, 12, Padding$$serializer.INSTANCE, padding);
                    i6 |= 4096;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 13:
                    themeVideoUrls2 = themeVideoUrls3;
                    border = (Border) aVarB.r(descriptor2, 13, Border$$serializer.INSTANCE, border);
                    i6 |= 8192;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 14:
                    themeVideoUrls2 = themeVideoUrls3;
                    shadow = (Shadow) aVarB.r(descriptor2, 14, Shadow$$serializer.INSTANCE, shadow);
                    i6 |= 16384;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 15:
                    themeVideoUrls2 = themeVideoUrls3;
                    list2 = (List) aVarB.r(descriptor2, 15, aVarArr[15], list2);
                    i6 |= DecoderReuseEvaluation.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls2;
                    break;
                case 16:
                    LocalizationKey$$serializer localizationKey$$serializer = LocalizationKey$$serializer.INSTANCE;
                    if (strM613unboximpl != null) {
                        themeVideoUrls = themeVideoUrls3;
                        localizationKeyM607boximpl = LocalizationKey.m607boximpl(strM613unboximpl);
                    } else {
                        themeVideoUrls = themeVideoUrls3;
                        localizationKeyM607boximpl = null;
                    }
                    ThemeImageUrls themeImageUrls2 = themeImageUrls;
                    LocalizationKey localizationKey = (LocalizationKey) aVarB.r(descriptor2, 16, localizationKey$$serializer, localizationKeyM607boximpl);
                    strM613unboximpl = localizationKey != null ? localizationKey.m613unboximpl() : null;
                    i6 |= C.DEFAULT_BUFFER_SEGMENT_SIZE;
                    z6 = z7;
                    themeVideoUrls3 = themeVideoUrls;
                    themeImageUrls = themeImageUrls2;
                    break;
                default:
                    throw new g5.g(iK);
            }
        }
        aVarB.c(descriptor2);
        return new VideoComponent(i6, themeVideoUrls3, themeImageUrls, bool, zX, zX2, zX3, zX4, size, fitMode, maskShape, colorScheme, padding2, padding, border, shadow, list2, strM613unboximpl, null, null);
    }

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

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

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