package hb;

import ca.canadapost.core.data.consumerhome.model.HomeTrackPinStatus;
import dn.p;
import gb.b0;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import q2.d;
import rm.n0;
import v2.r;
import y0.l2;
import y0.m;
import y0.x2;

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

    /* 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 */ b0 f21480p;

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(b0 b0Var, int i10) {
            super(2);
            this.f21480p = b0Var;
            this.f21481q = i10;
        }

        public final void a(m mVar, int i10) {
            j.a(this.f21480p, mVar, l2.a(this.f21481q | 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: 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 */ b0 f21482p;

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

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

        public final void a(m mVar, int i10) {
            j.a(this.f21482p, mVar, l2.a(this.f21483q | 1));
        }

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

    /* JADX WARN: Removed duplicated region for block: B:35:0x009c  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x00b4  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void a(b0 itemData, m mVar, int i10) {
        int i11;
        t.g(itemData, "itemData");
        m r10 = mVar.r(-703912858);
        if ((i10 & 14) == 0) {
            i11 = (r10.R(itemData) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i11 & 11) == 2 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(-703912858, i11, -1, "ca.canadapost.module.consumerhome.landing.items.trackpackageitem.Sender (Sender.kt:14)");
            }
            int i12 = itemData.f().isReturn() ? itemData.f().getStatus() == HomeTrackPinStatus.DELIVERED ? bb.h.f6875t0 : bb.h.f6877u0 : bb.h.f6879v0;
            String custNm = itemData.f().getCustNm();
            String recipientNm = itemData.f().getRecipientNm();
            if (itemData.f().isReturn()) {
                if (!(recipientNm == null || recipientNm.length() == 0)) {
                    custNm = recipientNm;
                    if (custNm != null) {
                        if (y0.p.H()) {
                            y0.p.P();
                        }
                        x2 y10 = r10.y();
                        if (y10 != null) {
                            y10.a(new b(itemData, i10));
                            return;
                        }
                        return;
                    }
                    r10.e(-862527902);
                    d.a aVar = new d.a(0, 1, null);
                    int l10 = aVar.l(n7.a.f29827a.c(r10, n7.a.f29828b).d().M());
                    try {
                        aVar.f(m2.j.b(i12, r10, 0));
                        aVar.f(" ");
                        n0 n0Var = n0.f34904a;
                        aVar.j(l10);
                        l10 = aVar.l(new q2.b0(0L, 0L, r.f38997q.a(), null, null, null, null, 0L, null, null, null, 0L, null, null, null, null, 65531, null));
                        try {
                            aVar.f(custNm);
                            aVar.j(l10);
                            q2.d m10 = aVar.m();
                            r10.N();
                            c.b(m10, bb.e.F, r10, 0);
                            if (y0.p.H()) {
                                y0.p.P();
                            }
                        } finally {
                        }
                    } finally {
                    }
                }
            }
            if (custNm == null || custNm.length() == 0) {
                custNm = null;
            }
            if (custNm != null) {
            }
        }
        x2 y11 = r10.y();
        if (y11 != null) {
            y11.a(new a(itemData, i10));
        }
    }
}
