package ca.canadapost.core.data.moshi.adapters;

import ca.canadapost.core.data.flex.model.FlexSupportedLanguages;
import km.f;
import km.v;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0000\u0018\u0000 \n2\u00020\u0001:\u0001\nB\u0007¢\u0006\u0004\b\b\u0010\tJ\u0014\u0010\u0005\u001a\u0004\u0018\u00010\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0007J\u0014\u0010\u0007\u001a\u0004\u0018\u00010\u00022\b\u0010\u0006\u001a\u0004\u0018\u00010\u0004H\u0007¨\u0006\u000b"}, d2 = {"Lca/canadapost/core/data/moshi/adapters/FlexSupportedLanguagesEnumAdapter;", "", "", "supportedLanguage", "Lca/canadapost/core/data/flex/model/FlexSupportedLanguages;", "fromJson", "flexSupportedLanguages", "toJson", "<init>", "()V", "a", "core_data_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes.dex */
public final class FlexSupportedLanguagesEnumAdapter {

    /* loaded from: classes.dex */
    public /* synthetic */ class b {

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f8037a;

        static {
            int[] iArr = new int[FlexSupportedLanguages.values().length];
            try {
                iArr[FlexSupportedLanguages.ENGLISH.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[FlexSupportedLanguages.FRENCH.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[FlexSupportedLanguages.BILINGUAL.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            f8037a = iArr;
        }
    }

    @f
    public final FlexSupportedLanguages fromJson(String supportedLanguage) {
        if (supportedLanguage != null) {
            int hashCode = supportedLanguage.hashCode();
            if (hashCode != -885774768) {
                if (hashCode != 238189923) {
                    if (hashCode == 2081901978 && supportedLanguage.equals("FRENCH")) {
                        return FlexSupportedLanguages.FRENCH;
                    }
                } else if (supportedLanguage.equals("BILINGUAL")) {
                    return FlexSupportedLanguages.BILINGUAL;
                }
            } else if (supportedLanguage.equals("ENGLISH")) {
                return FlexSupportedLanguages.ENGLISH;
            }
        }
        return null;
    }

    @v
    public final String toJson(FlexSupportedLanguages flexSupportedLanguages) {
        int i10 = flexSupportedLanguages == null ? -1 : b.f8037a[flexSupportedLanguages.ordinal()];
        if (i10 == 1) {
            return "ENGLISH";
        }
        if (i10 == 2) {
            return "FRENCH";
        }
        if (i10 != 3) {
            return null;
        }
        return "BILINGUAL";
    }
}
