package androidx.credentials;

import android.os.Bundle;
import androidx.media3.container.NalUnitUtil;
import defpackage.cr4;
import defpackage.kp6;
import defpackage.m38;
import defpackage.pq6;
import defpackage.uz1;
import defpackage.x15;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u0000 \u00072\u00020\u0001:\u0001\u0007B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"Landroidx/credentials/GetCredentialResponse;", "", "credential", "Landroidx/credentials/Credential;", "(Landroidx/credentials/Credential;)V", "getCredential", "()Landroidx/credentials/Credential;", "Companion", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public final class GetCredentialResponse {

    /* JADX INFO: renamed from: Companion, reason: from kotlin metadata */
    @kp6
    public static final Companion INSTANCE = new Companion(null);

    @kp6
    private static final String EXTRA_CREDENTIAL_DATA = "androidx.credentials.provider.extra.EXTRA_CREDENTIAL_DATA";

    @kp6
    private static final String EXTRA_CREDENTIAL_TYPE = "androidx.credentials.provider.extra.EXTRA_CREDENTIAL_TYPE";

    @kp6
    private final Credential credential;

    @Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0080\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0007J\u0012\u0010\n\u001a\u0004\u0018\u00010\t2\u0006\u0010\u000b\u001a\u00020\u0007H\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"Landroidx/credentials/GetCredentialResponse$Companion;", "", "()V", "EXTRA_CREDENTIAL_DATA", "", "EXTRA_CREDENTIAL_TYPE", "asBundle", "Landroid/os/Bundle;", "response", "Landroidx/credentials/GetCredentialResponse;", "fromBundle", "bundle", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class Companion {
        public /* synthetic */ Companion(uz1 uz1Var) {
            this();
        }

        @m38
        @x15
        @kp6
        public final Bundle asBundle(@kp6 GetCredentialResponse response) {
            cr4.g(response, "response");
            Bundle bundle = new Bundle();
            bundle.putString(GetCredentialResponse.EXTRA_CREDENTIAL_TYPE, response.getCredential().getType());
            bundle.putBundle(GetCredentialResponse.EXTRA_CREDENTIAL_DATA, response.getCredential().getData());
            return bundle;
        }

        @m38
        @pq6
        @x15
        public final GetCredentialResponse fromBundle(@kp6 Bundle bundle) {
            Bundle bundle2;
            cr4.g(bundle, "bundle");
            String string = bundle.getString(GetCredentialResponse.EXTRA_CREDENTIAL_TYPE);
            if (string == null || (bundle2 = bundle.getBundle(GetCredentialResponse.EXTRA_CREDENTIAL_DATA)) == null) {
                return null;
            }
            return new GetCredentialResponse(Credential.INSTANCE.createFrom(string, bundle2));
        }

        private Companion() {
        }
    }

    public GetCredentialResponse(@kp6 Credential credential) {
        cr4.g(credential, "credential");
        this.credential = credential;
    }

    @m38
    @x15
    @kp6
    public static final Bundle asBundle(@kp6 GetCredentialResponse getCredentialResponse) {
        return INSTANCE.asBundle(getCredentialResponse);
    }

    @m38
    @pq6
    @x15
    public static final GetCredentialResponse fromBundle(@kp6 Bundle bundle) {
        return INSTANCE.fromBundle(bundle);
    }

    @kp6
    public final Credential getCredential() {
        return this.credential;
    }
}
