package com.google.firebase.auth.internal;

import com.google.android.gms.internal.p002firebaseauthapi.zzahg;
import com.google.firebase.auth.ActionCodeInfo;
import com.google.firebase.auth.ActionCodeResult;

/* JADX INFO: loaded from: classes3.dex */
public final class zzu implements ActionCodeResult {
    private final int zza;
    private final String zzb;
    private final String zzc;
    private final ActionCodeInfo zzd;

    public zzu(zzahg zzahgVar) {
        int i6 = 5;
        this.zzb = zzahgVar.zzg() ? zzahgVar.zzc() : zzahgVar.zzb();
        this.zzc = zzahgVar.zzb();
        ActionCodeInfo zzsVar = null;
        if (!zzahgVar.zzh()) {
            this.zza = 3;
            this.zzd = null;
            return;
        }
        String strZzd = zzahgVar.zzd();
        strZzd.getClass();
        switch (strZzd) {
            case "REVERT_SECOND_FACTOR_ADDITION":
                i6 = 6;
                break;
            case "PASSWORD_RESET":
                i6 = 0;
                break;
            case "VERIFY_EMAIL":
                i6 = 1;
                break;
            case "VERIFY_AND_CHANGE_EMAIL":
                break;
            case "EMAIL_SIGNIN":
                i6 = 4;
                break;
            case "RECOVER_EMAIL":
                i6 = 2;
                break;
            default:
                i6 = 3;
                break;
        }
        this.zza = i6;
        if (i6 == 4 || i6 == 3) {
            this.zzd = null;
            return;
        }
        if (zzahgVar.zzf()) {
            zzsVar = new zzv(zzahgVar.zzb(), zzbk.zza(zzahgVar.zza()));
        } else if (zzahgVar.zzg()) {
            zzsVar = new zzt(zzahgVar.zzc(), zzahgVar.zzb());
        } else if (zzahgVar.zze()) {
            zzsVar = new zzs(zzahgVar.zzb());
        }
        this.zzd = zzsVar;
    }

    @Override // com.google.firebase.auth.ActionCodeResult
    public final String getData(int i6) {
        if (this.zza == 4) {
            return null;
        }
        if (i6 == 0) {
            return this.zzb;
        }
        if (i6 != 1) {
            return null;
        }
        return this.zzc;
    }

    @Override // com.google.firebase.auth.ActionCodeResult
    public final ActionCodeInfo getInfo() {
        return this.zzd;
    }

    @Override // com.google.firebase.auth.ActionCodeResult
    public final int getOperation() {
        return this.zza;
    }
}
