package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class LP implements InterfaceC0535Uq {
    public C0168Gm m;
    public int n;
    public LP p;
    public LP q;
    public C1670kT r;
    public AbstractC2239qS s;
    public boolean t;
    public boolean u;
    public boolean v;
    public boolean w;
    public C1352h3 x;
    public boolean y;
    public LP l = this;

    /* renamed from: o, reason: collision with root package name */
    public int f209o = -1;

    public void C0() {
        if (!this.y) {
            AbstractC2133pH.b("reset() called on an unattached node");
        }
        B0();
    }

    public void D0() {
        if (!this.y) {
            AbstractC2133pH.b("Must run markAsAttached() prior to runAttachLifecycle");
        }
        if (!this.v) {
            AbstractC2133pH.b("Must run runAttachLifecycle() only once after markAsAttached()");
        }
        this.v = false;
        z0();
        this.w = true;
    }

    public void E0() {
        if (!this.y) {
            AbstractC2133pH.b("node detached multiple times");
        }
        if (this.s == null) {
            AbstractC2133pH.b("detach invoked on a node without a coordinator");
        }
        if (!this.w) {
            AbstractC2133pH.b("Must run runDetachLifecycle() once after runAttachLifecycle() and before markAsDetached()");
        }
        this.w = false;
        C1352h3 c1352h3 = this.x;
        if (c1352h3 != null) {
            c1352h3.a();
        }
        A0();
    }

    public void F0(LP lp) {
        this.l = lp;
    }

    public void G0(AbstractC2239qS abstractC2239qS) {
        this.s = abstractC2239qS;
    }

    public final InterfaceC0065Cn v0() {
        C0168Gm c0168Gm = this.m;
        if (c0168Gm != null) {
            return c0168Gm;
        }
        C0168Gm c0168GmE = C80.e(((C2207q3) AbstractC2539te.T(this)).getCoroutineContext().M(new VI((TI) ((C2207q3) AbstractC2539te.T(this)).getCoroutineContext().m(C0669Zu.K))));
        this.m = c0168GmE;
        return c0168GmE;
    }

    public boolean w0() {
        return !(this instanceof C0106Ec);
    }

    public void x0() {
        if (this.y) {
            AbstractC2133pH.b("node attached multiple times");
        }
        if (this.s == null) {
            AbstractC2133pH.b("attach invoked on a node without a coordinator");
        }
        this.y = true;
        this.v = true;
    }

    public void y0() {
        if (!this.y) {
            AbstractC2133pH.b("Cannot detach a node that is not attached");
        }
        if (this.v) {
            AbstractC2133pH.b("Must run runAttachLifecycle() before markAsDetached()");
        }
        if (this.w) {
            AbstractC2133pH.b("Must run runDetachLifecycle() before markAsDetached()");
        }
        this.y = false;
        C0168Gm c0168Gm = this.m;
        if (c0168Gm != null) {
            C80.n(c0168Gm, new QP("The Modifier.Node was detached", 2));
            this.m = null;
        }
    }

    public void A0() {
    }

    public void B0() {
    }

    public void z0() {
    }
}
