package ῲ.Ԕ.K;

import androidx.fragment.app.Fragment;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import ῲ.ؿ.AbstractC1567;
import ῲ.ؿ.AbstractC1570;
import ῲ.ؿ.C1568;

/* renamed from: ῲ.Ԕ.K.ᕣ  reason: contains not printable characters */
/* compiled from: FragmentManagerViewModel */
public class C1525 extends AbstractC1567 {

    /* renamed from: 㿎  reason: contains not printable characters */
    public static final AbstractC1570 f5595 = new C1526();

    /* renamed from: ʬ  reason: contains not printable characters */
    public final HashMap<String, C1525> f5596 = new HashMap<>();

    /* renamed from: ඓ  reason: contains not printable characters */
    public final boolean f5597;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final HashSet<Fragment> f5598 = new HashSet<>();

    /* renamed from: ⁱ  reason: contains not printable characters */
    public boolean f5599 = false;

    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean f5600 = false;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final HashMap<String, C1568> f5601 = new HashMap<>();

    /* renamed from: ῲ.Ԕ.K.ᕣ$K  reason: contains not printable characters */
    /* compiled from: FragmentManagerViewModel */
    public static class C1526 implements AbstractC1570 {
        @Override // ῲ.ؿ.AbstractC1570
        /* renamed from: K  reason: contains not printable characters */
        public <T extends AbstractC1567> T m3910(Class<T> cls) {
            return new C1525(true);
        }
    }

    public C1525(boolean z) {
        this.f5597 = z;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || C1525.class != obj.getClass()) {
            return false;
        }
        C1525 r5 = (C1525) obj;
        if (!this.f5598.equals(r5.f5598) || !this.f5596.equals(r5.f5596) || !this.f5601.equals(r5.f5601)) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        int hashCode = this.f5596.hashCode();
        return this.f5601.hashCode() + ((hashCode + (this.f5598.hashCode() * 31)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("FragmentManagerViewModel{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append("} Fragments (");
        Iterator<Fragment> it2 = this.f5598.iterator();
        while (it2.hasNext()) {
            sb.append(it2.next());
            if (it2.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") Child Non Config (");
        Iterator<String> it3 = this.f5596.keySet().iterator();
        while (it3.hasNext()) {
            sb.append(it3.next());
            if (it3.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") ViewModelStores (");
        Iterator<String> it4 = this.f5601.keySet().iterator();
        while (it4.hasNext()) {
            sb.append(it4.next());
            if (it4.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(')');
        return sb.toString();
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public Collection<Fragment> m3901() {
        return this.f5598;
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean m3903(Fragment fragment) {
        return this.f5598.remove(fragment);
    }

    @Override // ῲ.ؿ.AbstractC1567
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m3904() {
        this.f5600 = true;
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m3906(Fragment fragment) {
        return this.f5598.add(fragment);
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean m3907(Fragment fragment) {
        if (!this.f5598.contains(fragment)) {
            return true;
        }
        if (this.f5597) {
            return this.f5600;
        }
        return !this.f5599;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public boolean m3909() {
        return this.f5600;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public C1525 m3902(Fragment fragment) {
        C1525 r0 = this.f5596.get(fragment.mWho);
        if (r0 != null) {
            return r0;
        }
        C1525 r02 = new C1525(this.f5597);
        this.f5596.put(fragment.mWho, r02);
        return r02;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m3905(Fragment fragment) {
        C1525 r0 = this.f5596.get(fragment.mWho);
        if (r0 != null) {
            r0.m3904();
            this.f5596.remove(fragment.mWho);
        }
        C1568 r02 = this.f5601.get(fragment.mWho);
        if (r02 != null) {
            r02.m4112();
            this.f5601.remove(fragment.mWho);
        }
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public C1568 m3908(Fragment fragment) {
        C1568 r0 = this.f5601.get(fragment.mWho);
        if (r0 != null) {
            return r0;
        }
        C1568 r02 = new C1568();
        this.f5601.put(fragment.mWho, r02);
        return r02;
    }
}
