package v0;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;

/* loaded from: classes.dex */
public abstract class r1 {

    /* renamed from: a, reason: collision with root package name */
    private static final float f38388a = c3.h.t(22);

    /* renamed from: b, reason: collision with root package name */
    private static final y.i f38389b = y.j.j(300, 0, y.f0.d(), 2, null);

    /* loaded from: classes.dex */
    public static final class a implements c2.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ s1 f38390p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ dn.l f38391q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ b0.q f38392r;

        a(s1 s1Var, dn.l lVar, b0.q qVar) {
            this.f38390p = s1Var;
            this.f38391q = lVar;
            this.f38392r = qVar;
        }

        private final float a(long j10) {
            return this.f38392r == b0.q.Horizontal ? r1.g.m(j10) : r1.g.n(j10);
        }

        private final long b(float f10) {
            b0.q qVar = this.f38392r;
            float f11 = qVar == b0.q.Horizontal ? f10 : 0.0f;
            if (qVar != b0.q.Vertical) {
                f10 = 0.0f;
            }
            return r1.h.a(f11, f10);
        }

        private final float c(long j10) {
            return this.f38392r == b0.q.Horizontal ? c3.y.h(j10) : c3.y.i(j10);
        }

        @Override // c2.a
        public long F0(long j10, int i10) {
            float a10 = a(j10);
            return (a10 >= BitmapDescriptorFactory.HUE_RED || !c2.e.d(i10, c2.e.f7396a.b())) ? r1.g.f34318b.c() : b(this.f38390p.d().n(a10));
        }

        @Override // c2.a
        public Object M0(long j10, long j11, vm.d dVar) {
            this.f38391q.invoke(kotlin.coroutines.jvm.internal.b.b(c(j11)));
            return c3.y.b(j11);
        }

        @Override // c2.a
        public Object Y(long j10, vm.d dVar) {
            float c10 = c(j10);
            float m10 = this.f38390p.m();
            float a10 = this.f38390p.d().o().a();
            if (c10 >= BitmapDescriptorFactory.HUE_RED || m10 <= a10) {
                j10 = c3.y.f7445b.a();
            } else {
                this.f38391q.invoke(kotlin.coroutines.jvm.internal.b.b(c10));
            }
            return c3.y.b(j10);
        }

        @Override // c2.a
        public long n1(long j10, long j11, int i10) {
            return c2.e.d(i10, c2.e.f7396a.b()) ? b(this.f38390p.d().n(a(j11))) : r1.g.f34318b.c();
        }
    }

    /* loaded from: classes.dex */
    static final class b extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final b f38393p = new b();

        b() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Boolean invoke(t1 t1Var) {
            return Boolean.TRUE;
        }
    }

    /* loaded from: classes.dex */
    static final class c extends kotlin.jvm.internal.v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ boolean f38394p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ c3.d f38395q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ t1 f38396r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ dn.l f38397s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ boolean f38398t;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(boolean z10, c3.d dVar, t1 t1Var, dn.l lVar, boolean z11) {
            super(0);
            this.f38394p = z10;
            this.f38395q = dVar;
            this.f38396r = t1Var;
            this.f38397s = lVar;
            this.f38398t = z11;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final s1 invoke() {
            return new s1(this.f38394p, this.f38395q, this.f38396r, this.f38397s, this.f38398t);
        }
    }

    public static final c2.a a(s1 s1Var, b0.q qVar, dn.l lVar) {
        return new a(s1Var, lVar, qVar);
    }

    public static final s1 d(boolean z10, dn.l lVar, t1 t1Var, boolean z11, y0.m mVar, int i10, int i11) {
        boolean z12 = (i11 & 1) != 0 ? false : z10;
        dn.l lVar2 = (i11 & 2) != 0 ? b.f38393p : lVar;
        t1 t1Var2 = (i11 & 4) != 0 ? t1.Hidden : t1Var;
        boolean z13 = (i11 & 8) != 0 ? false : z11;
        if (y0.p.H()) {
            y0.p.Q(1032784200, i10, -1, "androidx.compose.material3.rememberSheetState (SheetDefaults.kt:407)");
        }
        c3.d dVar = (c3.d) mVar.t(androidx.compose.ui.platform.c1.d());
        Object[] objArr = {Boolean.valueOf(z12), lVar2, Boolean.valueOf(z13)};
        i1.j a10 = s1.f38415d.a(z12, lVar2, dVar, z13);
        boolean R = ((((i10 & 14) ^ 6) > 4 && mVar.c(z12)) || (i10 & 6) == 4) | mVar.R(dVar) | ((((i10 & 896) ^ 384) > 256 && mVar.R(t1Var2)) || (i10 & 384) == 256) | ((((i10 & 112) ^ 48) > 32 && mVar.R(lVar2)) || (i10 & 48) == 32) | ((((i10 & 7168) ^ 3072) > 2048 && mVar.c(z13)) || (i10 & 3072) == 2048);
        Object f10 = mVar.f();
        if (R || f10 == y0.m.f51621a.a()) {
            f10 = new c(z12, dVar, t1Var2, lVar2, z13);
            mVar.I(f10);
        }
        s1 s1Var = (s1) i1.b.c(objArr, a10, null, (dn.a) f10, mVar, 0, 4);
        if (y0.p.H()) {
            y0.p.P();
        }
        return s1Var;
    }
}
