package v;

import G.C0237l;
import I0.AbstractC0301k;
import I0.AbstractC0303l;
import I0.InterfaceC0297i;
import I0.InterfaceC0299j;
import d3.C1931v0;
import x.EnumC3207z0;
import x.InterfaceC3146a1;
import x.Z0;

/* JADX INFO: renamed from: v.T0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C3004T0 extends AbstractC0301k implements InterfaceC0297i, I0.n0 {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public InterfaceC3146a1 f24790c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public EnumC3207z0 f24791d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f24792e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public x.Y f24793f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public z.m f24794j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public C0237l f24795k;
    public boolean l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public C3051u f24796m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public Z0 f24797n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public AbstractC0301k f24798o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public C3053v f24799p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public C3051u f24800q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public boolean f24801r;

    @Override // I0.n0
    public final void c0() throws Throwable {
        C3053v c3053v = (C3053v) AbstractC0303l.h(this, AbstractC2981H0.f24734a);
        if (kotlin.jvm.internal.o.c(c3053v, this.f24799p)) {
            return;
        }
        this.f24799p = c3053v;
        this.f24800q = null;
        AbstractC0301k abstractC0301k = this.f24798o;
        if (abstractC0301k != null) {
            u0(abstractC0301k);
        }
        this.f24798o = null;
        w0();
        Z0 z02 = this.f24797n;
        if (z02 != null) {
            InterfaceC3146a1 interfaceC3146a1 = this.f24790c;
            EnumC3207z0 enumC3207z0 = this.f24791d;
            C3051u c3051u = this.l ? this.f24800q : this.f24796m;
            z02.O0(this.f24795k, c3051u, this.f24793f, enumC3207z0, interfaceC3146a1, this.f24794j, this.f24792e, this.f24801r);
        }
    }

    @Override // i0.AbstractC2254r
    public final boolean getShouldAutoInvalidate() {
        return false;
    }

    @Override // i0.AbstractC2254r
    public final void onAttach() throws Throwable {
        this.f24801r = x0();
        w0();
        if (this.f24797n == null) {
            InterfaceC3146a1 interfaceC3146a1 = this.f24790c;
            C3051u c3051u = this.l ? this.f24800q : this.f24796m;
            Z0 z02 = new Z0(this.f24795k, c3051u, this.f24793f, this.f24791d, interfaceC3146a1, this.f24794j, this.f24792e, this.f24801r);
            t0(z02);
            this.f24797n = z02;
        }
    }

    @Override // i0.AbstractC2254r
    public final void onDetach() {
        AbstractC0301k abstractC0301k = this.f24798o;
        if (abstractC0301k != null) {
            u0(abstractC0301k);
        }
    }

    @Override // I0.InterfaceC0299j
    public final void onLayoutDirectionChange() {
        boolean zX0 = x0();
        if (this.f24801r != zX0) {
            this.f24801r = zX0;
            InterfaceC3146a1 interfaceC3146a1 = this.f24790c;
            EnumC3207z0 enumC3207z0 = this.f24791d;
            boolean z6 = this.l;
            C3051u c3051u = z6 ? this.f24800q : this.f24796m;
            y0(this.f24795k, c3051u, this.f24793f, enumC3207z0, interfaceC3146a1, this.f24794j, z6, this.f24792e);
        }
    }

    public final void w0() throws Throwable {
        InterfaceC0299j interfaceC0299j = this.f24798o;
        if (interfaceC0299j != null) {
            if (interfaceC0299j.getNode().isAttached()) {
                return;
            }
            t0(interfaceC0299j);
            return;
        }
        if (this.l) {
            AbstractC0303l.p(this, new C1931v0(this, 14));
        }
        C3051u c3051u = this.l ? this.f24800q : this.f24796m;
        if (c3051u != null) {
            AbstractC0301k abstractC0301k = c3051u.f24958i;
            if (abstractC0301k.getNode().isAttached()) {
                return;
            }
            t0(abstractC0301k);
            this.f24798o = abstractC0301k;
        }
    }

    public final boolean x0() {
        h1.m mVar = h1.m.f16628a;
        if (isAttached()) {
            mVar = AbstractC0303l.t(this).f2156D;
        }
        return mVar != h1.m.f16629b || this.f24791d == EnumC3207z0.f25984a;
    }

    public final void y0(C0237l c0237l, C3051u c3051u, x.Y y6, EnumC3207z0 enumC3207z0, InterfaceC3146a1 interfaceC3146a1, z.m mVar, boolean z6, boolean z7) {
        boolean z8;
        this.f24790c = interfaceC3146a1;
        this.f24791d = enumC3207z0;
        boolean z9 = true;
        if (this.l != z6) {
            this.l = z6;
            z8 = true;
        } else {
            z8 = false;
        }
        if (kotlin.jvm.internal.o.c(this.f24796m, c3051u)) {
            z9 = false;
        } else {
            this.f24796m = c3051u;
        }
        if (z8 || (z9 && !z6)) {
            AbstractC0301k abstractC0301k = this.f24798o;
            if (abstractC0301k != null) {
                u0(abstractC0301k);
            }
            this.f24798o = null;
            w0();
        }
        this.f24792e = z7;
        this.f24793f = y6;
        this.f24794j = mVar;
        this.f24795k = c0237l;
        boolean zX0 = x0();
        this.f24801r = zX0;
        Z0 z02 = this.f24797n;
        if (z02 != null) {
            z02.O0(c0237l, this.l ? this.f24800q : this.f24796m, y6, enumC3207z0, interfaceC3146a1, mVar, z7, zX0);
        }
    }
}
