package com.chartboost.sdk.privacy.model;

import com.ironsource.y8;
import com.mbridge.msdk.foundation.download.core.DownloadCommon;
import kotlin.Metadata;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u0000 \f2\u00020\u0001:\u0002\f\rB\u000f\u0012\u0006\u0010\u0003\u001a\u00020\t¢\u0006\u0004\b\n\u0010\u000bJ\u0017\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0005\u0010\u0006R\u0014\u0010\u0003\u001a\u00020\u00028VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0007\u0010\b¨\u0006\u000e"}, d2 = {"Lcom/chartboost/sdk/privacy/model/GDPR;", "Lcom/chartboost/sdk/privacy/model/GenericDataUseConsent;", "", y8.i.b0, "", "c", "(Ljava/lang/String;)Z", "getConsent", "()Ljava/lang/String;", "Lcom/chartboost/sdk/privacy/model/GDPR$GDPR_CONSENT;", "<init>", "(Lcom/chartboost/sdk/privacy/model/GDPR$GDPR_CONSENT;)V", "Companion", "GDPR_CONSENT", "ChartboostMonetization-9.8.1_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes2.dex */
public final class GDPR extends GenericDataUseConsent {
    public static final Companion Companion = new Companion(null);
    public static final String GDPR_STANDARD = "gdpr";

    @Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/chartboost/sdk/privacy/model/GDPR$Companion;", "", "()V", "GDPR_STANDARD", "", "ChartboostMonetization-9.8.1_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
    /* loaded from: classes2.dex */
    public static final class Companion {
        public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }
    }

    /* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
    /* JADX WARN: Unknown enum class pattern. Please report as an issue! */
    @Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\u0010\u000e\n\u0002\b\u000b\b\u0086\u0081\u0002\u0018\u0000 \n2\b\u0012\u0004\u0012\u00020\u00000\u0001:\u0001\nB\u0011\b\u0002\u0012\u0006\u0010\u0007\u001a\u00020\u0002¢\u0006\u0004\b\b\u0010\tR\u0017\u0010\u0007\u001a\u00020\u00028\u0006¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006j\u0002\b\u000bj\u0002\b\f¨\u0006\r"}, d2 = {"Lcom/chartboost/sdk/privacy/model/GDPR$GDPR_CONSENT;", "", "", DownloadCommon.DOWNLOAD_REPORT_FIND_FILE_RESULT_VALUE_B, "Ljava/lang/String;", "getValue", "()Ljava/lang/String;", "value", "<init>", "(Ljava/lang/String;ILjava/lang/String;)V", "Companion", "NON_BEHAVIORAL", "BEHAVIORAL", "ChartboostMonetization-9.8.1_productionRelease"}, k = 1, mv = {1, 9, 0})
    /* loaded from: classes2.dex */
    public static final class GDPR_CONSENT {
        private static final /* synthetic */ GDPR_CONSENT[] $VALUES;
        public static final Companion Companion;
        public static final /* synthetic */ EnumEntries c;
        public final String b;
        public static final GDPR_CONSENT NON_BEHAVIORAL = new GDPR_CONSENT("NON_BEHAVIORAL", 0, "0");
        public static final GDPR_CONSENT BEHAVIORAL = new GDPR_CONSENT("BEHAVIORAL", 1, "1");

        @Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007¨\u0006\u0007"}, d2 = {"Lcom/chartboost/sdk/privacy/model/GDPR$GDPR_CONSENT$Companion;", "", "()V", "fromValue", "Lcom/chartboost/sdk/privacy/model/GDPR$GDPR_CONSENT;", "value", "", "ChartboostMonetization-9.8.1_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
        /* loaded from: classes2.dex */
        public static final class Companion {
            public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }

            @JvmStatic
            public final GDPR_CONSENT fromValue(String value) {
                Intrinsics.checkNotNullParameter(value, "value");
                GDPR_CONSENT gdpr_consent = GDPR_CONSENT.NON_BEHAVIORAL;
                if (Intrinsics.areEqual(gdpr_consent.getValue(), value)) {
                    return gdpr_consent;
                }
                GDPR_CONSENT gdpr_consent2 = GDPR_CONSENT.BEHAVIORAL;
                if (Intrinsics.areEqual(gdpr_consent2.getValue(), value)) {
                    return gdpr_consent2;
                }
                return null;
            }

            private Companion() {
            }
        }

        static {
            GDPR_CONSENT[] a2 = a();
            $VALUES = a2;
            c = EnumEntriesKt.enumEntries(a2);
            Companion = new Companion(null);
        }

        public GDPR_CONSENT(String str, int i, String str2) {
            this.b = str2;
        }

        public static final /* synthetic */ GDPR_CONSENT[] a() {
            return new GDPR_CONSENT[]{NON_BEHAVIORAL, BEHAVIORAL};
        }

        @JvmStatic
        public static final GDPR_CONSENT fromValue(String str) {
            return Companion.fromValue(str);
        }

        public static EnumEntries<GDPR_CONSENT> getEntries() {
            return c;
        }

        public static GDPR_CONSENT valueOf(String str) {
            return (GDPR_CONSENT) Enum.valueOf(GDPR_CONSENT.class, str);
        }

        public static GDPR_CONSENT[] values() {
            return (GDPR_CONSENT[]) $VALUES.clone();
        }

        public final String getValue() {
            return this.b;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public GDPR(GDPR_CONSENT consent) {
        super(null, 1, null);
        Intrinsics.checkNotNullParameter(consent, "consent");
        if (c(consent.getValue())) {
            b(GDPR_STANDARD);
            a((Object) consent.getValue());
            return;
        }
        a("Invalid GDPR consent values. Use provided values or Custom class. Value: " + consent);
    }

    private final boolean c(String str) {
        return Intrinsics.areEqual(GDPR_CONSENT.NON_BEHAVIORAL.getValue(), str) || Intrinsics.areEqual(GDPR_CONSENT.BEHAVIORAL.getValue(), str);
    }

    @Override // com.chartboost.sdk.privacy.model.DataUseConsent
    public String getConsent() {
        Object a2 = a();
        Intrinsics.checkNotNull(a2, "null cannot be cast to non-null type kotlin.String");
        return (String) a2;
    }
}
