package com.google.android.gms.internal.p002firebaseauthapi; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.logging.Logger; import com.google.firebase.auth.e; import com.google.firebase.auth.g; import org.json.JSONObject; /* loaded from: classes.dex */ public final class zzacx implements zzabc { private static final String zza = "zzacx"; private static final Logger zzb = new Logger(zzacx.class.getSimpleName(), new String[0]); private final String zzc; private final String zzd; private final String zze; private final String zzf; public zzacx(g gVar, String str, String str2) { this.zzc = Preconditions.checkNotEmpty(gVar.a0()); this.zzd = Preconditions.checkNotEmpty(gVar.zzf()); this.zze = str; this.zzf = str2; } @Override // com.google.android.gms.internal.p002firebaseauthapi.zzabc public final String zza() { e b10 = e.b(this.zzd); String a10 = b10 != null ? b10.a() : null; String c10 = b10 != null ? b10.c() : null; JSONObject jSONObject = new JSONObject(); jSONObject.put(Scopes.EMAIL, this.zzc); if (a10 != null) { jSONObject.put("oobCode", a10); } if (c10 != null) { jSONObject.put("tenantId", c10); } String str = this.zze; if (str != null) { jSONObject.put("idToken", str); } String str2 = this.zzf; if (str2 != null) { zzafg.zzd(jSONObject, "captchaResp", str2); } else { zzafg.zzc(jSONObject); } return jSONObject.toString(); } }