package androidx.fragment.app;

import java.util.HashMap;
import java.util.Iterator;
import o.AbstractC0934ck0;
import o.C1413hk0;
import o.C1464iC;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class t extends AbstractC0934ck0 {
    public static final C1464iC h = new C1464iC(0);
    public final boolean e;
    public final HashMap b = new HashMap();
    public final HashMap c = new HashMap();
    public final HashMap d = new HashMap();
    public boolean f = false;
    public boolean g = false;

    public t(boolean z) {
        this.e = z;
    }

    @Override // o.AbstractC0934ck0
    public final void b() {
        if (s.F(3)) {
            toString();
        }
        this.f = true;
    }

    public final void c(l lVar) {
        if (this.g) {
            s.F(2);
            return;
        }
        String str = lVar.mWho;
        HashMap map = this.b;
        if (map.containsKey(str)) {
            return;
        }
        map.put(lVar.mWho, lVar);
        if (s.F(2)) {
            lVar.toString();
        }
    }

    public final void d(String str) {
        HashMap map = this.c;
        t tVar = (t) map.get(str);
        if (tVar != null) {
            tVar.b();
            map.remove(str);
        }
        HashMap map2 = this.d;
        C1413hk0 c1413hk0 = (C1413hk0) map2.get(str);
        if (c1413hk0 != null) {
            c1413hk0.a();
            map2.remove(str);
        }
    }

    public final void e(l lVar) {
        if (this.g) {
            s.F(2);
        } else {
            if (this.b.remove(lVar.mWho) == null || !s.F(2)) {
                return;
            }
            lVar.toString();
        }
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && t.class == obj.getClass()) {
            t tVar = (t) obj;
            if (this.b.equals(tVar.b) && this.c.equals(tVar.c) && this.d.equals(tVar.d)) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        return this.d.hashCode() + ((this.c.hashCode() + (this.b.hashCode() * 31)) * 31);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("FragmentManagerViewModel{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append("} Fragments (");
        Iterator it = this.b.values().iterator();
        while (it.hasNext()) {
            sb.append(it.next());
            if (it.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") Child Non Config (");
        Iterator it2 = this.c.keySet().iterator();
        while (it2.hasNext()) {
            sb.append((String) it2.next());
            if (it2.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") ViewModelStores (");
        Iterator it3 = this.d.keySet().iterator();
        while (it3.hasNext()) {
            sb.append((String) it3.next());
            if (it3.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(')');
        return sb.toString();
    }
}
