package v0;

import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import j2.g;
import java.util.UUID;
import y0.d4;
import y0.l2;
import y0.m;
import y0.n3;
import y0.x2;
import y0.y3;

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

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class a extends kotlin.jvm.internal.v implements dn.l {

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

        /* renamed from: v0.v0$a$a, reason: collision with other inner class name */
        /* loaded from: classes.dex */
        public static final class C0918a implements y0.l0 {

            /* renamed from: a, reason: collision with root package name */
            final /* synthetic */ s0 f38573a;

            public C0918a(s0 s0Var) {
                this.f38573a = s0Var;
            }

            @Override // y0.l0
            public void a() {
                this.f38573a.dismiss();
                this.f38573a.g();
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(s0 s0Var) {
            super(1);
            this.f38572p = s0Var;
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final y0.l0 invoke(y0.m0 m0Var) {
            this.f38572p.show();
            return new C0918a(this.f38572p);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class b extends kotlin.jvm.internal.v implements dn.a {

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

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

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

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ c3.t f38577s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(s0 s0Var, dn.a aVar, u0 u0Var, c3.t tVar) {
            super(0);
            this.f38574p = s0Var;
            this.f38575q = aVar;
            this.f38576r = u0Var;
            this.f38577s = tVar;
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m442invoke() {
            this.f38574p.k(this.f38575q, this.f38576r, this.f38577s);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.a f38578p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ u0 f38579q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ y.a f38580r;

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(dn.a aVar, u0 u0Var, y.a aVar2, dn.p pVar, int i10) {
            super(2);
            this.f38578p = aVar;
            this.f38579q = u0Var;
            this.f38580r = aVar2;
            this.f38581s = pVar;
            this.f38582t = i10;
        }

        public final void a(y0.m mVar, int i10) {
            v0.a(this.f38578p, this.f38579q, this.f38580r, this.f38581s, mVar, l2.a(this.f38582t | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return rm.n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class d extends kotlin.jvm.internal.v implements dn.p {

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

        /* JADX INFO: Access modifiers changed from: package-private */
        /* loaded from: classes.dex */
        public static final class a extends kotlin.jvm.internal.v implements dn.l {

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

            a() {
                super(1);
            }

            public final void a(o2.u uVar) {
                o2.s.j(uVar);
            }

            @Override // dn.l
            public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                a((o2.u) obj);
                return rm.n0.f34904a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(y3 y3Var) {
            super(2);
            this.f38583p = y3Var;
        }

        public final void a(y0.m mVar, int i10) {
            if ((i10 & 3) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(-1560960657, i10, -1, "androidx.compose.material3.ModalBottomSheetDialog.<anonymous>.<anonymous>.<anonymous> (ModalBottomSheet.android.kt:296)");
            }
            l1.i d10 = o2.l.d(l1.i.f27362a, false, a.f38584p, 1, null);
            y3 y3Var = this.f38583p;
            h2.e0 h10 = androidx.compose.foundation.layout.b.h(l1.c.f27332a.o(), false);
            int a10 = y0.j.a(mVar, 0);
            y0.y D = mVar.D();
            l1.i e10 = l1.h.e(mVar, d10);
            g.a aVar = j2.g.f23616d;
            dn.a a11 = aVar.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a11);
            } else {
                mVar.F();
            }
            y0.m a12 = d4.a(mVar);
            d4.b(a12, h10, aVar.c());
            d4.b(a12, D, aVar.e());
            dn.p b10 = aVar.b();
            if (a12.n() || !kotlin.jvm.internal.t.b(a12.f(), Integer.valueOf(a10))) {
                a12.I(Integer.valueOf(a10));
                a12.l(Integer.valueOf(a10), b10);
            }
            d4.b(a12, e10, aVar.d());
            androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
            v0.b(y3Var).invoke(mVar, 0);
            mVar.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return rm.n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class e extends kotlin.jvm.internal.v implements dn.a {

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

        e() {
            super(0);
        }

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

    /* loaded from: classes.dex */
    public /* synthetic */ class f {

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f38586a;

        static {
            int[] iArr = new int[androidx.compose.ui.window.s.values().length];
            try {
                iArr[androidx.compose.ui.window.s.SecureOff.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[androidx.compose.ui.window.s.SecureOn.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[androidx.compose.ui.window.s.Inherit.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            f38586a = iArr;
        }
    }

    public static final void a(dn.a aVar, u0 u0Var, y.a aVar2, dn.p pVar, y0.m mVar, int i10) {
        int i11;
        boolean z10;
        y0.m r10 = mVar.r(1254951810);
        if ((i10 & 6) == 0) {
            i11 = (r10.m(aVar) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 48) == 0) {
            i11 |= r10.R(u0Var) ? 32 : 16;
        }
        if ((i10 & 384) == 0) {
            i11 |= (i10 & 512) == 0 ? r10.R(aVar2) : r10.m(aVar2) ? 256 : 128;
        }
        if ((i10 & 3072) == 0) {
            i11 |= r10.m(pVar) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
        }
        int i12 = i11;
        if ((i12 & 1171) == 1170 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(1254951810, i12, -1, "androidx.compose.material3.ModalBottomSheetDialog (ModalBottomSheet.android.kt:272)");
            }
            View view = (View) r10.t(AndroidCompositionLocals_androidKt.k());
            c3.d dVar = (c3.d) r10.t(androidx.compose.ui.platform.c1.d());
            c3.t tVar = (c3.t) r10.t(androidx.compose.ui.platform.c1.j());
            y0.r d10 = y0.j.d(r10, 0);
            y3 o10 = n3.o(pVar, r10, (i12 >> 9) & 14);
            UUID uuid = (UUID) i1.b.c(new Object[0], null, null, e.f38585p, r10, 3072, 6);
            Object f10 = r10.f();
            m.a aVar3 = y0.m.f51621a;
            if (f10 == aVar3.a()) {
                y0.b0 b0Var = new y0.b0(y0.p0.i(vm.h.f40193p, r10));
                r10.I(b0Var);
                f10 = b0Var;
            }
            tp.m0 a10 = ((y0.b0) f10).a();
            boolean a11 = z.m.a(r10, 0);
            boolean R = r10.R(view) | r10.R(dVar);
            Object f11 = r10.f();
            if (R || f11 == aVar3.a()) {
                z10 = true;
                s0 s0Var = new s0(aVar, u0Var, view, tVar, dVar, uuid, aVar2, a10, a11);
                s0Var.h(d10, g1.c.c(-1560960657, true, new d(o10)));
                r10.I(s0Var);
                f11 = s0Var;
            } else {
                z10 = true;
            }
            s0 s0Var2 = (s0) f11;
            boolean m10 = r10.m(s0Var2);
            Object f12 = r10.f();
            if (m10 || f12 == aVar3.a()) {
                f12 = new a(s0Var2);
                r10.I(f12);
            }
            y0.p0.a(s0Var2, (dn.l) f12, r10, 0);
            boolean m11 = r10.m(s0Var2) | ((i12 & 14) == 4 ? z10 : false) | ((i12 & 112) == 32 ? z10 : false) | r10.R(tVar);
            Object f13 = r10.f();
            if (m11 || f13 == aVar3.a()) {
                f13 = new b(s0Var2, aVar, u0Var, tVar);
                r10.I(f13);
            }
            y0.p0.g((dn.a) f13, r10, 0);
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new c(aVar, u0Var, aVar2, pVar, i10));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final dn.p b(y3 y3Var) {
        return (dn.p) y3Var.getValue();
    }

    public static final boolean e(View view) {
        ViewGroup.LayoutParams layoutParams = view.getRootView().getLayoutParams();
        WindowManager.LayoutParams layoutParams2 = layoutParams instanceof WindowManager.LayoutParams ? (WindowManager.LayoutParams) layoutParams : null;
        return (layoutParams2 == null || (layoutParams2.flags & UserMetadata.MAX_INTERNAL_KEY_SIZE) == 0) ? false : true;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean f(androidx.compose.ui.window.s sVar, boolean z10) {
        int i10 = f.f38586a[sVar.ordinal()];
        if (i10 == 1) {
            return false;
        }
        if (i10 == 2) {
            return true;
        }
        if (i10 == 3) {
            return z10;
        }
        throw new rm.t();
    }
}
