package p000.p001.p021.p022;

import java.util.ArrayList;
import java.util.Iterator;
import kotlin.TypeCastException;
import p037.p099.C2229;
import p037.p099.InterfaceC2219;
import p037.p099.InterfaceC2230;
import p402.InterfaceC6540;
import p402.p411.p413.C6635;
import p402.p411.p413.C6649;
import p402.p411.p413.p414.InterfaceC6650;

/* JADX INFO: renamed from: ނ.֏.ؠ.֏.ތ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public final class C1243<T> extends C2229<T> {

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final ArrayList<C1244<? super T>> f4354 = new ArrayList<>();

    /* JADX INFO: renamed from: ނ.֏.ؠ.֏.ތ$֏, reason: contains not printable characters */
    public static final class C1244<T> implements InterfaceC2230<T> {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean f4355;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final InterfaceC2230<T> f4356;

        public C1244(InterfaceC2230<T> interfaceC2230) {
            if (interfaceC2230 != null) {
                this.f4356 = interfaceC2230;
            } else {
                C6635.m9824("observer");
                throw null;
            }
        }

        @Override // p037.p099.InterfaceC2230
        /* JADX INFO: renamed from: ֏ */
        public void mo1576(T t) {
            if (this.f4355) {
                this.f4355 = false;
                this.f4356.mo1576(t);
            }
        }
    }

    @Override // androidx.lifecycle.LiveData
    /* JADX INFO: renamed from: ֏ */
    public void mo342(InterfaceC2219 interfaceC2219, InterfaceC2230<? super T> interfaceC2230) {
        if (interfaceC2219 == null) {
            C6635.m9824("owner");
            throw null;
        }
        if (interfaceC2230 == null) {
            C6635.m9824("observer");
            throw null;
        }
        C1244<? super T> c1244 = new C1244<>(interfaceC2230);
        this.f4354.add(c1244);
        super.mo342(interfaceC2219, c1244);
    }

    @Override // p037.p099.C2229, androidx.lifecycle.LiveData
    /* JADX INFO: renamed from: ؠ */
    public void mo345(T t) {
        Iterator<T> it = this.f4354.iterator();
        while (it.hasNext()) {
            ((C1244) it.next()).f4355 = true;
        }
        super.mo345(t);
    }

    @Override // androidx.lifecycle.LiveData
    /* JADX INFO: renamed from: ؠ */
    public void mo346(InterfaceC2230<? super T> interfaceC2230) {
        if (interfaceC2230 == null) {
            C6635.m9824("observer");
            throw null;
        }
        super.mo346((InterfaceC2230) interfaceC2230);
        ArrayList<C1244<? super T>> arrayList = this.f4354;
        if (arrayList == null) {
            throw new TypeCastException("null cannot be cast to non-null type kotlin.collections.MutableCollection<T>");
        }
        if (arrayList instanceof InterfaceC6650) {
            C6649.m9834(arrayList, "kotlin.collections.MutableCollection");
            throw null;
        }
        arrayList.remove(interfaceC2230);
    }
}
