package l7;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import h2.e0;
import j2.g;
import java.util.List;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l1.i;
import rm.n0;
import v0.f0;
import v0.z1;
import y0.d4;
import y0.l2;
import y0.m;
import y0.q1;
import y0.s3;
import y0.x2;
import y0.y;

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(q1 q1Var) {
            super(0);
            this.f27538p = q1Var;
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m312invoke() {
            d.c(this.f27538p, !d.b(r1));
        }
    }

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(int i10, int i11) {
            super(2);
            this.f27539p = i10;
            this.f27540q = i11;
        }

        public final void a(y0.m mVar, int i10) {
            if ((i10 & 11) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(-907568072, i10, -1, "ca.canadapost.core.common.compose.components.CpcActionMenu.<anonymous>.<anonymous> (CpcActionMenu.kt:55)");
            }
            f0.a(m2.e.c(this.f27539p, mVar, 0), m2.j.b(this.f27540q, mVar, 0), null, 0L, mVar, 8, 12);
            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 n0.f34904a;
        }
    }

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(q1 q1Var) {
            super(0);
            this.f27541p = q1Var;
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m313invoke() {
            d.c(this.f27541p, false);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: l7.d$d, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0613d extends v implements dn.q {

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

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

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: l7.d$d$a */
        /* loaded from: classes.dex */
        public static final class a extends v implements dn.p {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ l7.c f27544p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(l7.c cVar) {
                super(2);
                this.f27544p = cVar;
            }

            public final void a(y0.m mVar, int i10) {
                if ((i10 & 11) == 2 && mVar.v()) {
                    mVar.A();
                    return;
                }
                if (y0.p.H()) {
                    y0.p.Q(1054654857, i10, -1, "ca.canadapost.core.common.compose.components.CpcActionMenu.<anonymous>.<anonymous>.<anonymous>.<anonymous> (CpcActionMenu.kt:68)");
                }
                z1.b(this.f27544p.c(), null, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, null, mVar, 0, 0, 131070);
                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 n0.f34904a;
            }
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: l7.d$d$b */
        /* loaded from: classes.dex */
        public static final class b extends v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ l7.c f27545p;

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            b(l7.c cVar, q1 q1Var) {
                super(0);
                this.f27545p = cVar;
                this.f27546q = q1Var;
            }

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

            /* renamed from: invoke, reason: collision with other method in class */
            public final void m314invoke() {
                this.f27545p.b().invoke();
                d.c(this.f27546q, false);
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0613d(List list, q1 q1Var) {
            super(3);
            this.f27542p = list;
            this.f27543q = q1Var;
        }

        public final void a(e0.f DropdownMenu, y0.m mVar, int i10) {
            t.g(DropdownMenu, "$this$DropdownMenu");
            if ((i10 & 81) == 16 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(732240384, i10, -1, "ca.canadapost.core.common.compose.components.CpcActionMenu.<anonymous>.<anonymous> (CpcActionMenu.kt:66)");
            }
            List<l7.c> list = this.f27542p;
            q1 q1Var = this.f27543q;
            for (l7.c cVar : list) {
                g1.a b10 = g1.c.b(mVar, 1054654857, true, new a(cVar));
                mVar.e(-703690229);
                boolean R = mVar.R(cVar) | mVar.R(q1Var);
                Object f10 = mVar.f();
                if (R || f10 == y0.m.f51621a.a()) {
                    f10 = new b(cVar, q1Var);
                    mVar.I(f10);
                }
                mVar.N();
                v0.a.b(b10, (dn.a) f10, null, cVar.a(), null, false, null, null, null, mVar, 6, 500);
            }
            if (y0.p.H()) {
                y0.p.P();
            }
        }

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

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

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ l1.i f27547p;

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(l1.i iVar, List list, int i10, int i11, int i12, int i13) {
            super(2);
            this.f27547p = iVar;
            this.f27548q = list;
            this.f27549r = i10;
            this.f27550s = i11;
            this.f27551t = i12;
            this.f27552u = i13;
        }

        public final void a(y0.m mVar, int i10) {
            d.a(this.f27547p, this.f27548q, this.f27549r, this.f27550s, mVar, l2.a(this.f27551t | 1), this.f27552u);
        }

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

    public static final void a(l1.i iVar, List actionMenuItems, int i10, int i11, y0.m mVar, int i12, int i13) {
        int i14;
        int i15;
        int i16;
        t.g(actionMenuItems, "actionMenuItems");
        y0.m r10 = mVar.r(-2060630443);
        l1.i iVar2 = (i13 & 1) != 0 ? l1.i.f27362a : iVar;
        if ((i13 & 4) != 0) {
            i15 = i12 & (-897);
            i14 = h7.h.f21032y0;
        } else {
            i14 = i10;
            i15 = i12;
        }
        if ((i13 & 8) != 0) {
            i15 &= -7169;
            i16 = h7.l.J;
        } else {
            i16 = i11;
        }
        if (y0.p.H()) {
            y0.p.Q(-2060630443, i15, -1, "ca.canadapost.core.common.compose.components.CpcActionMenu (CpcActionMenu.kt:49)");
        }
        Object f10 = r10.f();
        m.a aVar = y0.m.f51621a;
        if (f10 == aVar.a()) {
            f10 = s3.d(Boolean.FALSE, null, 2, null);
            r10.I(f10);
        }
        q1 q1Var = (q1) f10;
        l1.i y10 = androidx.compose.foundation.layout.o.y(iVar2, null, false, 3, null);
        e0 h10 = androidx.compose.foundation.layout.b.h(l1.c.f27332a.o(), false);
        int a10 = y0.j.a(r10, 0);
        y D = r10.D();
        l1.i e10 = l1.h.e(r10, y10);
        g.a aVar2 = j2.g.f23616d;
        dn.a a11 = aVar2.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a11);
        } else {
            r10.F();
        }
        y0.m a12 = d4.a(r10);
        d4.b(a12, h10, aVar2.c());
        d4.b(a12, D, aVar2.e());
        dn.p b10 = aVar2.b();
        if (a12.n() || !t.b(a12.f(), Integer.valueOf(a10))) {
            a12.I(Integer.valueOf(a10));
            a12.l(Integer.valueOf(a10), b10);
        }
        d4.b(a12, e10, aVar2.d());
        androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
        i.a aVar3 = l1.i.f27362a;
        l1.i o10 = androidx.compose.foundation.layout.o.o(aVar3, c3.h.t(48));
        r10.e(-703690792);
        boolean R = r10.R(q1Var);
        Object f11 = r10.f();
        if (R || f11 == aVar.a()) {
            f11 = new a(q1Var);
            r10.I(f11);
        }
        r10.N();
        v0.e0.a((dn.a) f11, o10, false, null, null, g1.c.b(r10, -907568072, true, new b(i14, i16)), r10, 196656, 28);
        boolean b11 = b(q1Var);
        r10.e(-703690496);
        boolean R2 = r10.R(q1Var);
        Object f12 = r10.f();
        if (R2 || f12 == aVar.a()) {
            f12 = new c(q1Var);
            r10.I(f12);
        }
        r10.N();
        int i17 = i16;
        int i18 = i14;
        l1.i iVar3 = iVar2;
        v0.a.a(b11, (dn.a) f12, androidx.compose.foundation.b.d(aVar3, n7.a.f29827a.a(r10, 6).a().i(), null, 2, null), 0L, null, null, null, 0L, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, null, g1.c.b(r10, 732240384, true, new C0613d(actionMenuItems, q1Var)), r10, 0, 48, 2040);
        r10.O();
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y11 = r10.y();
        if (y11 != null) {
            y11.a(new e(iVar3, actionMenuItems, i18, i17, i12, i13));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean b(q1 q1Var) {
        return ((Boolean) q1Var.getValue()).booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void c(q1 q1Var, boolean z10) {
        q1Var.setValue(Boolean.valueOf(z10));
    }
}
