package mb;

import android.content.Context;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import c3.w;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import e0.b;
import e0.c0;
import e0.f0;
import h2.e0;
import ib.a0;
import ib.b1;
import ib.w0;
import j2.g;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import l1.c;
import l1.i;
import rm.n0;
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: classes4.dex */
public abstract class p {

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

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

        a() {
            super(0);
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m353invoke() {
        }

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

    /* 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 */
        public static final b f28954p = new b();

        b() {
            super(0);
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m354invoke() {
        }

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

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

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

        c() {
            super(0);
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m355invoke() {
        }

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(q1 q1Var, q1 q1Var2) {
            super(1);
            this.f28956p = q1Var;
            this.f28957q = q1Var2;
        }

        public final void a(String value) {
            t.g(value, "value");
            p.h(this.f28956p, value);
            if (p.c(this.f28957q) != null) {
                p.d(this.f28957q, null);
            }
        }

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        e(q1 q1Var, q1 q1Var2) {
            super(1);
            this.f28958p = q1Var;
            this.f28959q = q1Var2;
        }

        public final void a(String value) {
            t.g(value, "value");
            p.j(this.f28958p, value);
            if (p.e(this.f28959q) != null) {
                p.f(this.f28959q, null);
            }
        }

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

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

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

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

        public final void a(String value) {
            t.g(value, "value");
            p.l(this.f28960p, value);
        }

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

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

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

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        g(dn.a aVar, Context context, q1 q1Var, q1 q1Var2, q1 q1Var3, q1 q1Var4) {
            super(0);
            this.f28961p = aVar;
            this.f28962q = context;
            this.f28963r = q1Var;
            this.f28964s = q1Var2;
            this.f28965t = q1Var3;
            this.f28966u = q1Var4;
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m356invoke() {
            if (p.b(this.f28962q, this.f28963r, this.f28964s, this.f28965t, this.f28966u)) {
                this.f28961p.invoke();
            }
        }
    }

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

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

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

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        h(dn.a aVar, dn.a aVar2, dn.a aVar3, a0 a0Var, int i10, int i11) {
            super(2);
            this.f28967p = aVar;
            this.f28968q = aVar2;
            this.f28969r = aVar3;
            this.f28970s = a0Var;
            this.f28971t = i10;
            this.f28972u = i11;
        }

        public final void a(y0.m mVar, int i10) {
            p.a(this.f28967p, this.f28968q, this.f28969r, this.f28970s, mVar, l2.a(this.f28971t | 1), this.f28972u);
        }

        @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(dn.a aVar, dn.a aVar2, dn.a aVar3, a0 a0Var, y0.m mVar, int i10, int i11) {
        y0.m r10 = mVar.r(1835684592);
        dn.a aVar4 = (i11 & 1) != 0 ? a.f28953p : aVar;
        dn.a aVar5 = (i11 & 2) != 0 ? b.f28954p : aVar2;
        dn.a aVar6 = (i11 & 4) != 0 ? c.f28955p : aVar3;
        if (y0.p.H()) {
            y0.p.Q(1835684592, i10, -1, "ca.canadapost.module.customsform.enhancement.ui.Step2Screen (Step2Screen.kt:42)");
        }
        androidx.compose.foundation.o a10 = androidx.compose.foundation.m.a(0, r10, 0, 1);
        androidx.compose.foundation.m.a(0, r10, 0, 1);
        Object f10 = r10.f();
        m.a aVar7 = y0.m.f51621a;
        if (f10 == aVar7.a()) {
            f10 = s3.d(0, null, 2, null);
            r10.I(f10);
        }
        Object f11 = r10.f();
        if (f11 == aVar7.a()) {
            f11 = s3.d("", null, 2, null);
            r10.I(f11);
        }
        q1 q1Var = (q1) f11;
        Object f12 = r10.f();
        if (f12 == aVar7.a()) {
            f12 = s3.d("", null, 2, null);
            r10.I(f12);
        }
        q1 q1Var2 = (q1) f12;
        Object f13 = r10.f();
        if (f13 == aVar7.a()) {
            f13 = s3.d("", null, 2, null);
            r10.I(f13);
        }
        q1 q1Var3 = (q1) f13;
        Object f14 = r10.f();
        if (f14 == aVar7.a()) {
            f14 = s3.d(null, null, 2, null);
            r10.I(f14);
        }
        q1 q1Var4 = (q1) f14;
        Object f15 = r10.f();
        if (f15 == aVar7.a()) {
            f15 = s3.d(null, null, 2, null);
            r10.I(f15);
        }
        q1 q1Var5 = (q1) f15;
        Context context = (Context) r10.t(AndroidCompositionLocals_androidKt.g());
        i.a aVar8 = l1.i.f27362a;
        l1.i d10 = androidx.compose.foundation.m.d(androidx.compose.foundation.layout.o.f(aVar8, BitmapDescriptorFactory.HUE_RED, 1, null), a10, false, null, false, 14, null);
        e0.b bVar = e0.b.f16607a;
        b.m h10 = bVar.h();
        c.a aVar9 = l1.c.f27332a;
        e0 a11 = e0.d.a(h10, aVar9.k(), r10, 0);
        int a12 = y0.j.a(r10, 0);
        y D = r10.D();
        l1.i e10 = l1.h.e(r10, d10);
        g.a aVar10 = j2.g.f23616d;
        dn.a a13 = aVar10.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a13);
        } else {
            r10.F();
        }
        y0.m a14 = d4.a(r10);
        d4.b(a14, a11, aVar10.c());
        d4.b(a14, D, aVar10.e());
        dn.p b10 = aVar10.b();
        if (a14.n() || !t.b(a14.f(), Integer.valueOf(a12))) {
            a14.I(Integer.valueOf(a12));
            a14.l(Integer.valueOf(a12), b10);
        }
        d4.b(a14, e10, aVar10.d());
        e0.g gVar = e0.g.f16653a;
        mb.h.b(2, 4, r10, 54);
        n7.a aVar11 = n7.a.f29827a;
        int i12 = n7.a.f29828b;
        float C = aVar11.b(r10, i12).C();
        l7.o oVar = l7.o.Vertical;
        l7.n.a(C, oVar, r10, 48);
        dn.a aVar12 = aVar4;
        dn.a aVar13 = aVar5;
        z1.b(m2.j.b(b1.f22587g, r10, 0), null, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar11.c(r10, i12).b(), r10, 0, 0, 65534);
        l7.n.a(aVar11.b(r10, i12).p(), oVar, r10, 48);
        String g10 = g(q1Var);
        r10.e(922238801);
        boolean R = r10.R(q1Var) | r10.R(q1Var4);
        Object f16 = r10.f();
        if (R || f16 == aVar7.a()) {
            f16 = new d(q1Var, q1Var4);
            r10.I(f16);
        }
        r10.N();
        ca.canadapost.core.common.customView.q.a(g10, (dn.l) f16, null, m2.j.b(b1.f22576a0, r10, 0), false, 0, null, 0L, null, 0L, null, null, false, false, null, null, null, c(q1Var4), null, null, r10, 0, 0, 917492);
        r10.e(-867352128);
        if (c(q1Var4) == null) {
            z1.b("Recipient's full name is required for customs.", null, 0L, w.g(14), null, null, null, w.e(0.5d), null, null, w.g(16), 0, false, 0, 0, null, aVar11.c(r10, i12).i(), r10, 12585990, 6, 64374);
        }
        r10.N();
        l7.n.a(aVar11.b(r10, i12).p(), oVar, r10, 48);
        l1.i h11 = androidx.compose.foundation.layout.o.h(aVar8, BitmapDescriptorFactory.HUE_RED, 1, null);
        e0 b11 = c0.b(bVar.e(), aVar9.l(), r10, 6);
        int a15 = y0.j.a(r10, 0);
        y D2 = r10.D();
        l1.i e11 = l1.h.e(r10, h11);
        dn.a a16 = aVar10.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a16);
        } else {
            r10.F();
        }
        y0.m a17 = d4.a(r10);
        d4.b(a17, b11, aVar10.c());
        d4.b(a17, D2, aVar10.e());
        dn.p b12 = aVar10.b();
        if (a17.n() || !t.b(a17.f(), Integer.valueOf(a15))) {
            a17.I(Integer.valueOf(a15));
            a17.l(Integer.valueOf(a15), b12);
        }
        d4.b(a17, e11, aVar10.d());
        f0 f0Var = f0.f16652a;
        String i13 = i(q1Var2);
        r10.e(922239718);
        boolean R2 = r10.R(q1Var2) | r10.R(q1Var5);
        Object f17 = r10.f();
        if (R2 || f17 == aVar7.a()) {
            f17 = new e(q1Var2, q1Var5);
            r10.I(f17);
        }
        dn.l lVar = (dn.l) f17;
        r10.N();
        l1.i g11 = androidx.compose.foundation.layout.o.g(aVar8, 0.7f);
        String b13 = m2.j.b(b1.f22594j0, r10, 0);
        String e12 = e(q1Var5);
        ca.canadapost.core.common.customView.k kVar = ca.canadapost.core.common.customView.k.PHONE_DIGITS_ONLY;
        ca.canadapost.core.common.customView.q.a(i13, lVar, g11, b13, false, 0, null, 0L, null, 0L, null, null, false, false, null, null, null, e12, kVar, null, r10, 384, 100663296, 655344);
        String k10 = k(q1Var3);
        r10.e(922240189);
        boolean R3 = r10.R(q1Var3);
        Object f18 = r10.f();
        if (R3 || f18 == aVar7.a()) {
            f18 = new f(q1Var3);
            r10.I(f18);
        }
        r10.N();
        ca.canadapost.core.common.customView.q.a(k10, (dn.l) f18, androidx.compose.foundation.layout.o.g(aVar8, 0.9f), m2.j.b(b1.Y, r10, 0), false, 0, null, 0L, null, 0L, null, null, false, false, null, null, null, null, kVar, null, r10, 384, 100663296, 786416);
        r10.O();
        r10.e(-867350696);
        if (e(q1Var5) == null) {
            z1.b(m2.j.b(b1.f22596k0, r10, 0), null, 0L, w.g(14), null, null, null, w.e(0.5d), null, null, w.g(16), 0, false, 0, 0, null, aVar11.c(r10, i12).i(), r10, 12585984, 6, 64374);
        }
        r10.N();
        l7.n.a(aVar11.b(r10, i12).A(), oVar, r10, 48);
        r10.e(-867350215);
        if (a0Var != null) {
            m.b(a0Var, a0Var.F1(), r10, 72, 0);
            n0 n0Var = n0.f34904a;
        }
        r10.N();
        l7.n.a(aVar11.b(r10, i12).A(), oVar, r10, 48);
        l1.i d11 = androidx.compose.foundation.d.d(androidx.compose.foundation.layout.l.k(androidx.compose.foundation.layout.o.h(aVar8, BitmapDescriptorFactory.HUE_RED, 1, null), BitmapDescriptorFactory.HUE_RED, aVar11.b(r10, i12).p(), 1, null), false, null, null, aVar12, 7, null);
        e0 b14 = c0.b(bVar.o(aVar11.b(r10, i12).s()), aVar9.i(), r10, 48);
        int a18 = y0.j.a(r10, 0);
        y D3 = r10.D();
        l1.i e13 = l1.h.e(r10, d11);
        dn.a a19 = aVar10.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a19);
        } else {
            r10.F();
        }
        y0.m a20 = d4.a(r10);
        d4.b(a20, b14, aVar10.c());
        d4.b(a20, D3, aVar10.e());
        dn.p b15 = aVar10.b();
        if (a20.n() || !t.b(a20.f(), Integer.valueOf(a18))) {
            a20.I(Integer.valueOf(a18));
            a20.l(Integer.valueOf(a18), b15);
        }
        d4.b(a20, e13, aVar10.d());
        z.a0.a(m2.e.c(w0.f23077d, r10, 0), null, null, null, null, BitmapDescriptorFactory.HUE_RED, null, r10, 56, 124);
        z1.b(m2.j.b(b1.H0, r10, 0), null, 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar11.c(r10, i12).o(), r10, 0, 0, 65534);
        r10.O();
        l7.n.a(aVar11.b(r10, i12).A(), oVar, r10, 48);
        l1.i h12 = androidx.compose.foundation.layout.o.h(aVar8, BitmapDescriptorFactory.HUE_RED, 1, null);
        g gVar2 = new g(aVar13, context, q1Var, q1Var4, q1Var2, q1Var5);
        mb.e eVar = mb.e.f28818a;
        l7.f.b(h12, gVar2, eVar.a(), r10, 390, 0);
        l7.f.a(androidx.compose.foundation.layout.l.k(androidx.compose.foundation.layout.o.h(aVar8, BitmapDescriptorFactory.HUE_RED, 1, null), BitmapDescriptorFactory.HUE_RED, aVar11.b(r10, i12).p(), 1, null), aVar6, eVar.b(), r10, ((i10 >> 3) & 112) | 384, 0);
        r10.O();
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new h(aVar12, aVar13, aVar6, a0Var, i10, i11));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean b(Context context, q1 q1Var, q1 q1Var2, q1 q1Var3, q1 q1Var4) {
        boolean C;
        boolean z10;
        String str;
        boolean C2;
        C = kotlin.text.y.C(g(q1Var));
        boolean z11 = false;
        String str2 = null;
        if (C) {
            str = context.getString(b1.L);
            z10 = false;
        } else {
            z10 = true;
            str = null;
        }
        d(q1Var2, str);
        C2 = kotlin.text.y.C(i(q1Var3));
        if (C2) {
            str2 = context.getString(b1.P);
        } else {
            z11 = z10;
        }
        f(q1Var4, str2);
        return z11;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final String c(q1 q1Var) {
        return (String) q1Var.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void d(q1 q1Var, String str) {
        q1Var.setValue(str);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final String e(q1 q1Var) {
        return (String) q1Var.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void f(q1 q1Var, String str) {
        q1Var.setValue(str);
    }

    private static final String g(q1 q1Var) {
        return (String) q1Var.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void h(q1 q1Var, String str) {
        q1Var.setValue(str);
    }

    private static final String i(q1 q1Var) {
        return (String) q1Var.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void j(q1 q1Var, String str) {
        q1Var.setValue(str);
    }

    private static final String k(q1 q1Var) {
        return (String) q1Var.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void l(q1 q1Var, String str) {
        q1Var.setValue(str);
    }
}
