package a4; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.ads.RequestConfiguration; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.internal.p002firebaseauthapi.zzadu; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; /* loaded from: classes2.dex */ public final class e1 extends com.google.firebase.auth.t { public static final Parcelable.Creator CREATOR = new f1(); /* renamed from: a, reason: collision with root package name */ private zzadu f61a; /* renamed from: b, reason: collision with root package name */ private a1 f62b; /* renamed from: c, reason: collision with root package name */ private final String f63c; /* renamed from: d, reason: collision with root package name */ private String f64d; /* renamed from: e, reason: collision with root package name */ private List f65e; /* renamed from: f, reason: collision with root package name */ private List f66f; /* renamed from: g, reason: collision with root package name */ private String f67g; /* renamed from: h, reason: collision with root package name */ private Boolean f68h; /* renamed from: i, reason: collision with root package name */ private g1 f69i; /* renamed from: j, reason: collision with root package name */ private boolean f70j; /* renamed from: k, reason: collision with root package name */ private com.google.firebase.auth.g1 f71k; /* renamed from: l, reason: collision with root package name */ private t f72l; public e1(w3.f fVar, List list) { Preconditions.checkNotNull(fVar); this.f63c = fVar.n(); this.f64d = "com.google.firebase.auth.internal.DefaultFirebaseUser"; this.f67g = "2"; f0(list); } public final e1 D0() { this.f68h = Boolean.FALSE; return this; } public final List E0() { t tVar = this.f72l; return tVar != null ? tVar.P() : new ArrayList(); } public final List F0() { return this.f65e; } public final void G0(com.google.firebase.auth.g1 g1Var) { this.f71k = g1Var; } public final void H0(boolean z10) { this.f70j = z10; } @Override // com.google.firebase.auth.o0 public final String I() { return this.f62b.I(); } public final void I0(g1 g1Var) { this.f69i = g1Var; } public final boolean J0() { return this.f70j; } @Override // com.google.firebase.auth.t public final /* synthetic */ com.google.firebase.auth.z P() { return new c(this); } @Override // com.google.firebase.auth.t public final List R() { return this.f65e; } @Override // com.google.firebase.auth.t public final String S() { Map map; zzadu zzaduVar = this.f61a; if (zzaduVar == null || zzaduVar.zze() == null || (map = (Map) q.a(zzaduVar.zze()).a().get("firebase")) == null) { return null; } return (String) map.get("tenant"); } @Override // com.google.firebase.auth.t public final String Y() { return this.f62b.P(); } @Override // com.google.firebase.auth.t public final boolean a0() { Boolean bool = this.f68h; if (bool == null || bool.booleanValue()) { zzadu zzaduVar = this.f61a; String b10 = zzaduVar != null ? q.a(zzaduVar.zze()).b() : RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED; boolean z10 = false; if (this.f65e.size() <= 1 && (b10 == null || !b10.equals("custom"))) { z10 = true; } this.f68h = Boolean.valueOf(z10); } return this.f68h.booleanValue(); } @Override // com.google.firebase.auth.t public final /* bridge */ /* synthetic */ com.google.firebase.auth.t d0() { D0(); return this; } @Override // com.google.firebase.auth.t public final synchronized com.google.firebase.auth.t f0(List list) { Preconditions.checkNotNull(list); this.f65e = new ArrayList(list.size()); this.f66f = new ArrayList(list.size()); for (int i10 = 0; i10 < list.size(); i10++) { com.google.firebase.auth.o0 o0Var = (com.google.firebase.auth.o0) list.get(i10); if (o0Var.I().equals("firebase")) { this.f62b = (a1) o0Var; } else { this.f66f.add(o0Var.I()); } this.f65e.add((a1) o0Var); } if (this.f62b == null) { this.f62b = (a1) this.f65e.get(0); } return this; } @Override // com.google.firebase.auth.t public final String getEmail() { return this.f62b.getEmail(); } @Override // com.google.firebase.auth.t public final zzadu j0() { return this.f61a; } @Override // com.google.firebase.auth.t public final List m0() { return this.f66f; } @Override // com.google.firebase.auth.t public final void n0(zzadu zzaduVar) { this.f61a = (zzadu) Preconditions.checkNotNull(zzaduVar); } @Override // com.google.firebase.auth.t public final void q0(List list) { Parcelable.Creator creator = t.CREATOR; t tVar = null; if (list != null && !list.isEmpty()) { ArrayList arrayList = new ArrayList(); ArrayList arrayList2 = new ArrayList(); Iterator it = list.iterator(); while (it.hasNext()) { com.google.firebase.auth.b0 b0Var = (com.google.firebase.auth.b0) it.next(); if (b0Var instanceof com.google.firebase.auth.j0) { arrayList.add((com.google.firebase.auth.j0) b0Var); } else if (b0Var instanceof com.google.firebase.auth.m0) { arrayList2.add((com.google.firebase.auth.m0) b0Var); } } tVar = new t(arrayList, arrayList2); } this.f72l = tVar; } public final com.google.firebase.auth.u r0() { return this.f69i; } public final w3.f u0() { return w3.f.m(this.f63c); } public final com.google.firebase.auth.g1 w0() { return this.f71k; } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i10) { int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeParcelable(parcel, 1, this.f61a, i10, false); SafeParcelWriter.writeParcelable(parcel, 2, this.f62b, i10, false); SafeParcelWriter.writeString(parcel, 3, this.f63c, false); SafeParcelWriter.writeString(parcel, 4, this.f64d, false); SafeParcelWriter.writeTypedList(parcel, 5, this.f65e, false); SafeParcelWriter.writeStringList(parcel, 6, this.f66f, false); SafeParcelWriter.writeString(parcel, 7, this.f67g, false); SafeParcelWriter.writeBooleanObject(parcel, 8, Boolean.valueOf(a0()), false); SafeParcelWriter.writeParcelable(parcel, 9, this.f69i, i10, false); SafeParcelWriter.writeBoolean(parcel, 10, this.f70j); SafeParcelWriter.writeParcelable(parcel, 11, this.f71k, i10, false); SafeParcelWriter.writeParcelable(parcel, 12, this.f72l, i10, false); SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader); } public final e1 z0(String str) { this.f67g = str; return this; } @Override // com.google.firebase.auth.t public final String zze() { return this.f61a.zze(); } @Override // com.google.firebase.auth.t public final String zzf() { return this.f61a.zzh(); } e1(zzadu zzaduVar, a1 a1Var, String str, String str2, List list, List list2, String str3, Boolean bool, g1 g1Var, boolean z10, com.google.firebase.auth.g1 g1Var2, t tVar) { this.f61a = zzaduVar; this.f62b = a1Var; this.f63c = str; this.f64d = str2; this.f65e = list; this.f66f = list2; this.f67g = str3; this.f68h = bool; this.f69i = g1Var; this.f70j = z10; this.f71k = g1Var2; this.f72l = tVar; } }