package com.revenuecat.purchases.paywalls.components;

import g5.a;
import g5.f;
import i5.e;
import i5.g;
import j5.c;
import j5.d;
import kotlin.jvm.internal.o;
import l5.C;
import l5.k;
import l5.m;
import l5.n;

/* JADX INFO: loaded from: classes3.dex */
final class FontSizeSerializer implements a {
    public static final FontSizeSerializer INSTANCE = new FontSizeSerializer();
    private static final g descriptor = W.a.L("FontSize", e.f19083o);

    private FontSizeSerializer() {
    }

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

    @Override // g5.a
    public /* bridge */ /* synthetic */ void serialize(d dVar, Object obj) {
        serialize(dVar, ((Number) obj).intValue());
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    @Override // g5.a
    public Integer deserialize(c decoder) {
        int iE;
        o.h(decoder, "decoder");
        k kVar = decoder instanceof k ? (k) decoder : null;
        if (kVar == null) {
            throw new f("Expected font_size to be part of a JSON object");
        }
        m mVarL = kVar.l();
        C c6 = mVarL instanceof C ? (C) mVarL : null;
        if (c6 == null) {
            throw new f("Expected font_size to be a JsonPrimitive");
        }
        if (c6.h()) {
            String strG = c6.g();
            switch (strG.hashCode()) {
                case -1383701233:
                    if (strG.equals("body_l")) {
                        iE = 17;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case -1383701232:
                    if (strG.equals("body_m")) {
                        iE = 15;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case -1383701226:
                    if (strG.equals("body_s")) {
                        iE = 13;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case -209710737:
                    if (strG.equals("heading_l")) {
                        iE = 28;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case -209710736:
                    if (strG.equals("heading_m")) {
                        iE = 24;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case -209710730:
                    if (strG.equals("heading_s")) {
                        iE = 20;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case 54935217:
                    if (strG.equals("body_xl")) {
                        iE = 18;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case 331460015:
                    if (strG.equals("heading_xxl")) {
                        iE = 40;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case 2088902225:
                    if (strG.equals("heading_xl")) {
                        iE = 34;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                case 2088902232:
                    if (strG.equals("heading_xs")) {
                        iE = 16;
                        break;
                    }
                    throw new f("Unknown font size name: ".concat(strG));
                default:
                    throw new f("Unknown font size name: ".concat(strG));
            }
        }
        iE = n.e(c6);
        return Integer.valueOf(iE);
    }

    public void serialize(d encoder, int i6) {
        o.h(encoder, "encoder");
        throw new IllegalStateException("Serialization is not implemented as it is not (yet) needed.");
    }
}
