package u0;

import android.view.View;
import android.view.ViewGroup;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import d0.n;
import rm.n0;
import s1.a0;
import s1.j0;

/* loaded from: classes.dex */
public final class b extends q implements k {
    private j N;
    private n O;

    /* loaded from: classes.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.a {
        a() {
            super(0);
        }

        @Override // dn.a
        public /* bridge */ /* synthetic */ Object invoke() {
            m433invoke();
            return n0.f34904a;
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m433invoke() {
            j2.s.a(b.this);
        }
    }

    public /* synthetic */ b(d0.j jVar, boolean z10, float f10, j0 j0Var, dn.a aVar, kotlin.jvm.internal.k kVar) {
        this(jVar, z10, f10, j0Var, aVar);
    }

    private final j v2() {
        ViewGroup e10;
        j c10;
        j jVar = this.N;
        if (jVar != null) {
            kotlin.jvm.internal.t.d(jVar);
            return jVar;
        }
        e10 = t.e((View) j2.i.a(this, AndroidCompositionLocals_androidKt.k()));
        c10 = t.c(e10);
        this.N = c10;
        kotlin.jvm.internal.t.d(c10);
        return c10;
    }

    private final void w2(n nVar) {
        this.O = nVar;
        j2.s.a(this);
    }

    @Override // l1.i.c
    public void S1() {
        j jVar = this.N;
        if (jVar != null) {
            jVar.a(this);
        }
    }

    @Override // u0.q
    public void m2(n.b bVar, long j10, float f10) {
        int c10;
        n b10 = v2().b(this);
        boolean o22 = o2();
        c10 = fn.c.c(f10);
        b10.b(bVar, o22, j10, c10, q2(), ((g) p2().invoke()).d(), new a());
        w2(b10);
    }

    @Override // u0.q
    public void n2(u1.f fVar) {
        a0 i10 = fVar.Q0().i();
        n nVar = this.O;
        if (nVar != null) {
            nVar.f(r2(), q2(), ((g) p2().invoke()).d());
            nVar.draw(s1.c.d(i10));
        }
    }

    @Override // u0.k
    public void s0() {
        w2(null);
    }

    @Override // u0.q
    public void t2(n.b bVar) {
        n nVar = this.O;
        if (nVar != null) {
            nVar.e();
        }
    }

    private b(d0.j jVar, boolean z10, float f10, j0 j0Var, dn.a aVar) {
        super(jVar, z10, f10, j0Var, aVar, null);
    }
}
