package rb;

import androidx.compose.foundation.layout.o;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import dn.l;
import dn.p;
import dn.q;
import e0.c0;
import e0.e0;
import e0.f0;
import j2.g;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l1.i;
import m2.j;
import rm.n0;
import sm.u;
import ub.h;
import v0.z1;
import y0.d4;
import y0.l2;
import y0.m;
import y0.x2;
import y0.y;

/* loaded from: classes4.dex */
public abstract class c {

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

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

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

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

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

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

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: rb.c$a$a, reason: collision with other inner class name */
        /* loaded from: classes4.dex */
        public static final class C0811a extends v implements dn.a {

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0811a(l lVar, int i10) {
                super(0);
                this.f34563p = lVar;
                this.f34564q = i10;
            }

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

            /* renamed from: invoke, reason: collision with other method in class */
            public final void m413invoke() {
                this.f34563p.invoke(Integer.valueOf(this.f34564q));
            }
        }

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

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

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

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

            /* renamed from: invoke, reason: collision with other method in class */
            public final void m414invoke() {
                this.f34565p.invoke();
            }
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: rb.c$a$c, reason: collision with other inner class name */
        /* loaded from: classes4.dex */
        public static final class C0812c extends v implements q {

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0812c(List list) {
                super(3);
                this.f34566p = list;
            }

            public final void a(e0 CpcPrimaryButton, m mVar, int i10) {
                boolean z10;
                String b10;
                t.g(CpcPrimaryButton, "$this$CpcPrimaryButton");
                if ((i10 & 81) == 16 && mVar.v()) {
                    mVar.A();
                    return;
                }
                if (y0.p.H()) {
                    y0.p.Q(541796704, i10, -1, "ca.canadapost.module.epostprofile.account.changepassword.ChangePasswordLandingScreen.<anonymous>.<anonymous>.<anonymous> (ChangePasswordLandingFragment.kt:286)");
                }
                List list = this.f34566p;
                if (!(list instanceof Collection) || !list.isEmpty()) {
                    Iterator it = list.iterator();
                    while (it.hasNext()) {
                        z10 = true;
                        if (((rm.v) it.next()).c() == h.SECURITY_QUESTIONS) {
                            break;
                        }
                    }
                }
                z10 = false;
                if (z10) {
                    mVar.e(1806931475);
                    b10 = j.b(ob.l.f31285i1, mVar, 0);
                    mVar.N();
                } else {
                    mVar.e(1806931610);
                    b10 = j.b(ob.l.f31290j1, mVar, 0);
                    mVar.N();
                }
                z1.b(b10, null, 0L, n7.a.f29827a.b(mVar, n7.a.f29828b).o0(), null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, null, mVar, 0, 0, 131062);
                if (y0.p.H()) {
                    y0.p.P();
                }
            }

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(List list, dn.a aVar, dn.a aVar2, int i10, l lVar) {
            super(2);
            this.f34558p = list;
            this.f34559q = aVar;
            this.f34560r = aVar2;
            this.f34561s = i10;
            this.f34562t = lVar;
        }

        /* JADX WARN: Type inference failed for: r13v1 */
        /* JADX WARN: Type inference failed for: r13v2, types: [boolean, int] */
        /* JADX WARN: Type inference failed for: r13v5 */
        public final void a(m mVar, int i10) {
            l lVar;
            int i11;
            dn.a aVar;
            dn.a aVar2;
            List list;
            boolean z10;
            i iVar;
            boolean z11;
            String b10;
            boolean z12;
            String b11;
            if ((i10 & 11) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(-1276409597, i10, -1, "ca.canadapost.module.epostprofile.account.changepassword.ChangePasswordLandingScreen.<anonymous> (ChangePasswordLandingFragment.kt:214)");
            }
            List list2 = this.f34558p;
            dn.a aVar3 = this.f34559q;
            dn.a aVar4 = this.f34560r;
            int i12 = this.f34561s;
            l lVar2 = this.f34562t;
            i.a aVar5 = i.f27362a;
            h2.e0 a10 = e0.d.a(e0.b.f16607a.h(), l1.c.f27332a.k(), mVar, 0);
            int a11 = y0.j.a(mVar, 0);
            y D = mVar.D();
            i e10 = l1.h.e(mVar, aVar5);
            g.a aVar6 = g.f23616d;
            dn.a a12 = aVar6.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar.o(a12);
            } else {
                mVar.F();
            }
            m a13 = d4.a(mVar);
            d4.b(a13, a10, aVar6.c());
            d4.b(a13, D, aVar6.e());
            p b12 = aVar6.b();
            if (a13.n() || !t.b(a13.f(), Integer.valueOf(a11))) {
                a13.I(Integer.valueOf(a11));
                a13.l(Integer.valueOf(a11), b12);
            }
            d4.b(a13, e10, aVar6.d());
            e0.g gVar = e0.g.f16653a;
            mVar.e(-198818727);
            if (list2.size() > 0) {
                n7.a aVar7 = n7.a.f29827a;
                int i13 = n7.a.f29828b;
                i m10 = androidx.compose.foundation.layout.l.m(aVar5, aVar7.b(mVar, i13).H(), aVar7.b(mVar, i13).J(), aVar7.b(mVar, i13).H(), BitmapDescriptorFactory.HUE_RED, 8, null);
                List list3 = list2;
                boolean z13 = list3 instanceof Collection;
                if (!z13 || !list3.isEmpty()) {
                    Iterator it = list3.iterator();
                    while (it.hasNext()) {
                        if (((rm.v) it.next()).c() == h.SECURITY_QUESTIONS) {
                            z11 = true;
                            break;
                        }
                    }
                }
                z11 = false;
                if (z11) {
                    mVar.e(-198818295);
                    b10 = j.b(ob.l.f31300l1, mVar, 0);
                    mVar.N();
                } else {
                    mVar.e(-198818169);
                    b10 = j.b(ob.l.f31295k1, mVar, 0);
                    mVar.N();
                }
                n7.a aVar8 = n7.a.f29827a;
                int i14 = n7.a.f29828b;
                i11 = i12;
                aVar = aVar3;
                aVar2 = aVar4;
                list = list2;
                lVar = lVar2;
                z1.b(b10, m10, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar8.c(mVar, i14).b(), mVar, 0, 0, 65532);
                i j10 = androidx.compose.foundation.layout.l.j(i.f27362a, aVar8.b(mVar, i14).H(), aVar8.b(mVar, i14).H());
                if (!z13 || !list3.isEmpty()) {
                    Iterator it2 = list3.iterator();
                    while (it2.hasNext()) {
                        if (((rm.v) it2.next()).c() == h.SECURITY_QUESTIONS) {
                            z12 = true;
                            break;
                        }
                    }
                }
                z12 = false;
                if (z12) {
                    mVar.e(-198817630);
                    b11 = j.b(ob.l.f31320p1, mVar, 0);
                    mVar.N();
                } else {
                    mVar.e(-198817504);
                    b11 = j.b(ob.l.f31330r1, mVar, 0);
                    mVar.N();
                }
                z1.b(b11, j10, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, n7.a.f29827a.c(mVar, n7.a.f29828b).m(), mVar, 0, 0, 65532);
            } else {
                lVar = lVar2;
                i11 = i12;
                aVar = aVar3;
                aVar2 = aVar4;
                list = list2;
            }
            mVar.N();
            i a14 = j0.a.a(i.f27362a);
            m mVar2 = mVar;
            boolean z14 = 0;
            h2.e0 a15 = e0.d.a(e0.b.f16607a.h(), l1.c.f27332a.k(), mVar2, 0);
            int a16 = y0.j.a(mVar2, 0);
            y D2 = mVar.D();
            i e11 = l1.h.e(mVar2, a14);
            g.a aVar9 = g.f23616d;
            dn.a a17 = aVar9.a();
            if (!(mVar.w() instanceof y0.f)) {
                y0.j.c();
            }
            mVar.u();
            if (mVar.n()) {
                mVar2.o(a17);
            } else {
                mVar.F();
            }
            m a18 = d4.a(mVar);
            d4.b(a18, a15, aVar9.c());
            d4.b(a18, D2, aVar9.e());
            p b13 = aVar9.b();
            if (a18.n() || !t.b(a18.f(), Integer.valueOf(a16))) {
                a18.I(Integer.valueOf(a16));
                a18.l(Integer.valueOf(a16), b13);
            }
            d4.b(a18, e11, aVar9.d());
            e0.g gVar2 = e0.g.f16653a;
            mVar2.e(-198817163);
            List list4 = list;
            int i15 = 0;
            for (Object obj : list4) {
                int i16 = i15 + 1;
                if (i15 < 0) {
                    u.u();
                }
                rm.v vVar = (rm.v) obj;
                i w10 = o.w(o.h(i.f27362a, BitmapDescriptorFactory.HUE_RED, 1, null), null, z14, 3, null);
                int i17 = i11;
                boolean z15 = i15 == i17 ? true : z14;
                o2.f h10 = o2.f.h(o2.f.f30548b.e());
                mVar2.e(-76697901);
                l lVar3 = lVar;
                boolean m11 = mVar2.m(lVar3) | mVar2.i(i15);
                Object f10 = mVar.f();
                if (m11 || f10 == m.f51621a.a()) {
                    f10 = new C0811a(lVar3, i15);
                    mVar2.I(f10);
                }
                mVar.N();
                i c10 = androidx.compose.foundation.selection.a.c(w10, z15, false, h10, (dn.a) f10, 2, null);
                n7.a aVar10 = n7.a.f29827a;
                int i18 = n7.a.f29828b;
                i m12 = androidx.compose.foundation.layout.l.m(c10, aVar10.b(mVar2, i18).M(), BitmapDescriptorFactory.HUE_RED, aVar10.b(mVar2, i18).M(), aVar10.b(mVar2, i18).M(), 2, null);
                h2.e0 b14 = c0.b(e0.b.f16607a.g(), l1.c.f27332a.i(), mVar2, 48);
                int a19 = y0.j.a(mVar2, z14);
                y D3 = mVar.D();
                i e12 = l1.h.e(mVar2, m12);
                g.a aVar11 = g.f23616d;
                dn.a a20 = aVar11.a();
                if (!(mVar.w() instanceof y0.f)) {
                    y0.j.c();
                }
                mVar.u();
                if (mVar.n()) {
                    mVar2.o(a20);
                } else {
                    mVar.F();
                }
                m a21 = d4.a(mVar);
                d4.b(a21, b14, aVar11.c());
                d4.b(a21, D3, aVar11.e());
                p b15 = aVar11.b();
                if (a21.n() || !t.b(a21.f(), Integer.valueOf(a19))) {
                    a21.I(Integer.valueOf(a19));
                    a21.l(Integer.valueOf(a19), b15);
                }
                d4.b(a21, e12, aVar11.d());
                f0 f0Var = f0.f16652a;
                if (i15 == i17) {
                    iVar = null;
                    z10 = true;
                } else {
                    z10 = z14;
                    iVar = null;
                }
                l7.m.a(iVar, z10, mVar2, z14, 1);
                z1.b((String) vVar.d(), null, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar10.c(mVar2, i18).b(), mVar, 0, 0, 65534);
                mVar.O();
                mVar2 = mVar;
                i15 = i16;
                lVar = lVar3;
                i11 = i17;
                z14 = z14;
                list4 = list4;
            }
            List list5 = list4;
            mVar.N();
            mVar.O();
            mVar.e(-198815873);
            if (list5.size() > 0) {
                i h11 = o.h(i.f27362a, BitmapDescriptorFactory.HUE_RED, 1, null);
                n7.a aVar12 = n7.a.f29827a;
                int i19 = n7.a.f29828b;
                i m13 = androidx.compose.foundation.layout.l.m(h11, aVar12.b(mVar, i19).H(), aVar12.b(mVar, i19).J(), aVar12.b(mVar, i19).H(), BitmapDescriptorFactory.HUE_RED, 8, null);
                mVar.e(-76696504);
                dn.a aVar13 = aVar;
                boolean m14 = mVar.m(aVar13);
                Object f11 = mVar.f();
                if (m14 || f11 == m.f51621a.a()) {
                    f11 = new b(aVar13);
                    mVar.I(f11);
                }
                mVar.N();
                l7.f.b(m13, (dn.a) f11, g1.c.b(mVar, 541796704, true, new C0812c(list5)), mVar, 384, 0);
            }
            mVar.N();
            i.a aVar14 = i.f27362a;
            n7.a aVar15 = n7.a.f29827a;
            int i20 = n7.a.f29828b;
            l7.f.a(androidx.compose.foundation.layout.l.j(aVar14, aVar15.b(mVar, i20).P(), aVar15.b(mVar, i20).P()), aVar2, f.f34613a.a(), mVar, 384, 0);
            mVar.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }

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

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

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

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

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

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(boolean z10, List list, int i10, dn.a aVar, l lVar, dn.a aVar2, dn.a aVar3, int i11) {
            super(2);
            this.f34567p = z10;
            this.f34568q = list;
            this.f34569r = i10;
            this.f34570s = aVar;
            this.f34571t = lVar;
            this.f34572u = aVar2;
            this.f34573v = aVar3;
            this.f34574w = i11;
        }

        public final void a(m mVar, int i10) {
            c.a(this.f34567p, this.f34568q, this.f34569r, this.f34570s, this.f34571t, this.f34572u, this.f34573v, mVar, l2.a(this.f34574w | 1));
        }

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

    /* JADX INFO: Access modifiers changed from: private */
    public static final void a(boolean z10, List list, int i10, dn.a aVar, l lVar, dn.a aVar2, dn.a aVar3, m mVar, int i11) {
        m r10 = mVar.r(-1570063622);
        if (y0.p.H()) {
            y0.p.Q(-1570063622, i11, -1, "ca.canadapost.module.epostprofile.account.changepassword.ChangePasswordLandingScreen (ChangePasswordLandingFragment.kt:208)");
        }
        l7.l.a(i.f27362a, z10, aVar2, g1.c.b(r10, -1276409597, true, new a(list, aVar3, aVar, i10, lVar)), r10, ((i11 << 3) & 112) | 3078 | ((i11 >> 9) & 896), 0);
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new b(z10, list, i10, aVar, lVar, aVar2, aVar3, i11));
        }
    }
}
