package K1;

import android.app.PendingIntent;
import android.content.IntentSender;
import android.os.ResultReceiver;
import androidx.credentials.playservices.HiddenActivity;
import com.google.android.gms.auth.api.identity.BeginSignInResult;
import com.google.android.gms.auth.api.identity.SavePasswordResult;
import kotlin.jvm.internal.C;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import n0.E;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class d extends p implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f4044a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f4045b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ int f4046c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ d(int i6, int i7, Object obj) {
        super(1);
        this.f4044a = i7;
        this.f4045b = obj;
        this.f4046c = i6;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        switch (this.f4044a) {
            case 0:
                HiddenActivity hiddenActivity = (HiddenActivity) this.f4045b;
                BeginSignInResult beginSignInResult = (BeginSignInResult) obj;
                try {
                    hiddenActivity.f11304b = true;
                    hiddenActivity.startIntentSenderForResult(beginSignInResult.getPendingIntent().getIntentSender(), this.f4046c, null, 0, 0, 0, null);
                    break;
                } catch (IntentSender.SendIntentException e6) {
                    ResultReceiver resultReceiver = hiddenActivity.f11303a;
                    o.e(resultReceiver);
                    hiddenActivity.a(resultReceiver, "GET_UNKNOWN", "During begin sign in, one tap ui intent sender failure: " + e6.getMessage());
                }
                return C3137A.f25453a;
            case 1:
                HiddenActivity hiddenActivity2 = (HiddenActivity) this.f4045b;
                SavePasswordResult savePasswordResult = (SavePasswordResult) obj;
                try {
                    hiddenActivity2.f11304b = true;
                    hiddenActivity2.startIntentSenderForResult(savePasswordResult.getPendingIntent().getIntentSender(), this.f4046c, null, 0, 0, 0, null);
                    break;
                } catch (IntentSender.SendIntentException e7) {
                    ResultReceiver resultReceiver2 = hiddenActivity2.f11303a;
                    o.e(resultReceiver2);
                    hiddenActivity2.a(resultReceiver2, "CREATE_UNKNOWN", "During save password, found UI intent sender failure: " + e7.getMessage());
                }
                return C3137A.f25453a;
            case 2:
                HiddenActivity hiddenActivity3 = (HiddenActivity) this.f4045b;
                PendingIntent result = (PendingIntent) obj;
                o.h(result, "result");
                try {
                    hiddenActivity3.f11304b = true;
                    hiddenActivity3.startIntentSenderForResult(result.getIntentSender(), this.f4046c, null, 0, 0, 0, null);
                    break;
                } catch (IntentSender.SendIntentException e8) {
                    ResultReceiver resultReceiver3 = hiddenActivity3.f11303a;
                    o.e(resultReceiver3);
                    hiddenActivity3.a(resultReceiver3, "CREATE_UNKNOWN", "During public key credential, found IntentSender failure on public key creation: " + e8.getMessage());
                }
                return C3137A.f25453a;
            case 3:
                HiddenActivity hiddenActivity4 = (HiddenActivity) this.f4045b;
                PendingIntent pendingIntent = (PendingIntent) obj;
                try {
                    hiddenActivity4.f11304b = true;
                    hiddenActivity4.startIntentSenderForResult(pendingIntent.getIntentSender(), this.f4046c, null, 0, 0, 0, null);
                    break;
                } catch (IntentSender.SendIntentException e9) {
                    ResultReceiver resultReceiver4 = hiddenActivity4.f11303a;
                    o.e(resultReceiver4);
                    hiddenActivity4.a(resultReceiver4, "GET_UNKNOWN", "During get sign-in intent, one tap ui intent sender failure: " + e9.getMessage());
                }
                return C3137A.f25453a;
            default:
                Boolean boolValueOf = Boolean.valueOf(((E) obj).A0(this.f4046c));
                ((C) this.f4045b).f20115a = boolValueOf;
                return boolValueOf;
        }
    }
}
