package defpackage;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

/* renamed from: ᵭᵰ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4152 extends AbstractC0481 {

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public static final ˁˑᵰ f15510 = new ˁˑᵰ(7);

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final boolean f15511;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final HashMap f15515 = new HashMap();

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final HashMap f15514 = new HashMap();

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final HashMap f15516 = new HashMap();

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public boolean f15513 = false;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public boolean f15512 = false;

    public C4152(boolean z) {
        this.f15511 = z;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && C4152.class == obj.getClass()) {
            C4152 c4152 = (C4152) obj;
            if (this.f15515.equals(c4152.f15515) && this.f15514.equals(c4152.f15514) && this.f15516.equals(c4152.f15516)) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        return this.f15516.hashCode() + ((this.f15514.hashCode() + (this.f15515.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.f15515.values().iterator();
        while (it.hasNext()) {
            sb.append(it.next());
            if (it.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") Child Non Config (");
        Iterator it2 = this.f15514.keySet().iterator();
        while (it2.hasNext()) {
            sb.append((String) it2.next());
            if (it2.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(") ViewModelStores (");
        Iterator it3 = this.f15516.keySet().iterator();
        while (it3.hasNext()) {
            sb.append((String) it3.next());
            if (it3.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(')');
        return sb.toString();
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final void m9053(String str, boolean z) {
        HashMap map = this.f15514;
        C4152 c4152 = (C4152) map.get(str);
        if (c4152 != null) {
            if (z) {
                ArrayList arrayList = new ArrayList();
                arrayList.addAll(c4152.f15514.keySet());
                int size = arrayList.size();
                int i = 0;
                while (i < size) {
                    Object obj = arrayList.get(i);
                    i++;
                    AbstractC4731.m9918(3);
                    c4152.m9053((String) obj, true);
                }
            }
            c4152.mo2099();
            map.remove(str);
        }
        HashMap map2 = this.f15516;
        C3534 c3534 = (C3534) map2.get(str);
        if (c3534 != null) {
            c3534.m8076();
            map2.remove(str);
        }
    }

    @Override // defpackage.AbstractC0481
    /* renamed from: ˏˋٴ */
    public final void mo2099() {
        if (AbstractC4731.m9918(3)) {
            toString();
        }
        this.f15513 = true;
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final void m9054(AbstractComponentCallbacksC3693 abstractComponentCallbacksC3693) {
        if (this.f15512) {
            AbstractC4731.m9918(2);
        } else {
            if (this.f15515.remove(abstractComponentCallbacksC3693.f13772) == null || !AbstractC4731.m9918(2)) {
                return;
            }
            abstractComponentCallbacksC3693.toString();
        }
    }
}
