package F;

import B.B0;
import I0.AbstractC0303l;
import i0.AbstractC2254r;
import n.C2566A;

/* JADX INFO: renamed from: F.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0149c extends AbstractC2254r {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public R0.d f1262a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ C0150d f1263b;

    public C0149c(C0150d c0150d) {
        this.f1263b = c0150d;
    }

    @Override // i0.AbstractC2254r
    public final void onAttach() {
        C0150d c0150d = this.f1263b;
        c0150d.f1269a = this;
        if (c0150d.f1270b != null) {
            t0();
        }
    }

    @Override // i0.AbstractC2254r
    public final void onDetach() {
        C0150d c0150d = this.f1263b;
        if (c0150d.f1269a == this) {
            c0150d.f1269a = null;
        }
        R0.d dVar = this.f1262a;
        if (dVar != null) {
            dVar.b();
        }
        this.f1262a = null;
    }

    public final void t0() {
        B0 b02 = new B0(5, this, this.f1263b);
        I0.H hT = AbstractC0303l.t(this);
        int i6 = hT.f2175b;
        R0.b rectManager = ((J0.A) I0.K.a(hT)).getRectManager();
        R0.e eVar = rectManager.f6006b;
        eVar.getClass();
        R0.d dVar = new R0.d(eVar, i6, this, b02);
        C2566A c2566a = eVar.f6030a;
        Object objB = c2566a.b(i6);
        if (objB == null) {
            c2566a.i(i6, dVar);
            objB = dVar;
        }
        R0.d dVar2 = (R0.d) objB;
        if (dVar2 != dVar) {
            while (true) {
                R0.d dVar3 = dVar2.f6025d;
                if (dVar3 == null) {
                    break;
                } else {
                    dVar2 = dVar3;
                }
            }
            dVar2.f6025d = dVar;
        }
        if (AbstractC0303l.t(getNode()).f2181k) {
            rectManager.f6005a.j(i6, true);
        }
        rectManager.f6008d = true;
        rectManager.i();
        this.f1262a = dVar;
    }
}
