package jg;

import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import ca.canadapost.core.data.model.PackageDeliveryOptionInstructionResponse;
import ca.canadapost.module.track.model.CustomsHandlingPricing;
import ca.canadapost.module.track.model.Datetime;
import ca.canadapost.module.track.model.DeliveryDate;
import ca.canadapost.module.track.model.DeliveryDateLabel;
import ca.canadapost.module.track.model.Event;
import ca.canadapost.module.track.model.ExpectedDlvryDateTime;
import ca.canadapost.module.track.model.ExpectedDlvryWindow;
import ca.canadapost.module.track.model.LocationAddr;
import ca.canadapost.module.track.model.PackageDTPaymentDetails;
import ca.canadapost.module.track.model.PackageDetailsDTO;
import ca.canadapost.module.track.model.PackageEventType;
import ca.canadapost.module.track.model.PackageItemEventViewModel;
import ca.canadapost.module.track.model.PackageItemModel;
import ca.canadapost.module.track.model.TrackItemType;
import ig.a;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.EnumMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import org.joda.time.DateTime;

/* loaded from: classes4.dex */
public final class w3 extends androidx.lifecycle.b {
    private final androidx.lifecycle.f0 A;
    private final androidx.lifecycle.f0 B;
    private final androidx.lifecycle.f0 C;
    private final androidx.lifecycle.f0 D;
    private final androidx.lifecycle.f0 E;
    private final androidx.lifecycle.f0 F;
    private final androidx.lifecycle.f0 G;
    private final androidx.lifecycle.f0 H;
    private final androidx.lifecycle.f0 I;
    private final androidx.lifecycle.f0 J;
    private final androidx.lifecycle.f0 K;
    private final androidx.lifecycle.f0 L;
    private final androidx.lifecycle.f0 M;
    private final androidx.lifecycle.f0 N;
    private final androidx.lifecycle.f0 O;
    private final androidx.lifecycle.f0 P;
    private final androidx.lifecycle.f0 Q;
    private final androidx.lifecycle.f0 R;
    private final androidx.lifecycle.f0 S;
    private final androidx.lifecycle.a0 T;
    private final androidx.lifecycle.f0 U;
    private final androidx.lifecycle.a0 V;
    private final l8.g W;
    private final androidx.lifecycle.a0 X;
    private final l8.g Y;
    private final androidx.lifecycle.a0 Z;

    /* renamed from: a0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24854a0;

    /* renamed from: b0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24855b0;

    /* renamed from: c, reason: collision with root package name */
    private final PackageItemModel f24856c;

    /* renamed from: c0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24857c0;

    /* renamed from: d, reason: collision with root package name */
    private final ca.a f24858d;

    /* renamed from: d0, reason: collision with root package name */
    private final androidx.lifecycle.g0 f24859d0;

    /* renamed from: e, reason: collision with root package name */
    private final t7.c f24860e;

    /* renamed from: e0, reason: collision with root package name */
    private final int f24861e0;

    /* renamed from: f, reason: collision with root package name */
    private final p9.h f24862f;

    /* renamed from: f0, reason: collision with root package name */
    private final int f24863f0;

    /* renamed from: g, reason: collision with root package name */
    private final g9.d f24864g;

    /* renamed from: h, reason: collision with root package name */
    private final ka.b f24865h;

    /* renamed from: i, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24866i;

    /* renamed from: j, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24867j;

    /* renamed from: k, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24868k;

    /* renamed from: l, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24869l;

    /* renamed from: m, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24870m;

    /* renamed from: n, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24871n;

    /* renamed from: o, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24872o;

    /* renamed from: p, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24873p;

    /* renamed from: q, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24874q;

    /* renamed from: r, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24875r;

    /* renamed from: s, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24876s;

    /* renamed from: t, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24877t;

    /* renamed from: u, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24878u;

    /* renamed from: v, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24879v;

    /* renamed from: w, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24880w;

    /* renamed from: x, reason: collision with root package name */
    private final androidx.lifecycle.a0 f24881x;

    /* renamed from: y, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24882y;

    /* renamed from: z, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24883z;

    public /* synthetic */ w3(PackageItemModel packageItemModel, ca.a aVar, t7.c cVar, o9.c cVar2, p9.h hVar, g9.d dVar, ka.b bVar, int i10, kotlin.jvm.internal.k kVar) {
        this(packageItemModel, aVar, cVar, cVar2, (i10 & 16) != 0 ? null : hVar, dVar, bVar);
    }

    private final DateTime C1(String str, String str2) {
        String str3 = str + "T" + str2;
        try {
            try {
                return x3.a().e(str3);
            } catch (Exception unused) {
                return x3.a().g(str3).j();
            }
        } catch (Exception unused2) {
            return null;
        }
    }

    private final void D1() {
        ArrayList arrayList = new ArrayList();
        if (this.f24856c.getEvents() != null) {
            for (Event event : this.f24856c.getEvents()) {
                arrayList.add(new PackageItemEventViewModel(event.getCd(), event.getDatetime(), event.getDescEn(), event.getDescFr(), event.getLocationAddr(), event.getRetailLocationId(), event.getType(), event.getSignatureNm(), event.getWebCd()));
                if (kotlin.jvm.internal.t.b(event.getType(), "Signature")) {
                    this.f24856c.setSignatureNm(event.getSignatureNm());
                }
                String dnc = event.getDnc();
                if (dnc != null) {
                    this.D.q(dnc);
                }
                String retailLocationId = event.getRetailLocationId();
                if (retailLocationId != null) {
                    this.C.q(retailLocationId);
                }
            }
        }
        this.E.q(arrayList);
    }

    private final String E1(int i10, int i11) {
        StringBuilder sb2 = new StringBuilder();
        sb2.append(this.f24860e.getString(yf.h.R0));
        sb2.append(i10);
        sb2.append(this.f24860e.getString(yf.h.f52563c3));
        sb2.append(i11);
        if (qa.d.h(this.f24856c.getUserDescription())) {
            sb2.append(this.f24860e.getString(yf.h.f52579g));
            sb2.append(this.f24856c.getItemNumber());
        } else {
            sb2.append(this.f24856c.getUserDescription());
        }
        sb2.append(this.f24860e.getString(yf.h.H1));
        String sb3 = sb2.toString();
        kotlin.jvm.internal.t.f(sb3, "toString(...)");
        return sb3;
    }

    private final void F1() {
        Double codAmtDue;
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null || (codAmtDue = details.getCodAmtDue()) == null) {
            return;
        }
        double doubleValue = codAmtDue.doubleValue();
        if (doubleValue > 0.0d) {
            this.f24875r.q(this.f24860e.d(yf.h.P, this.f24858d.i(Double.valueOf(doubleValue))));
        }
    }

    private final void H1(PackageDeliveryOptionInstructionResponse packageDeliveryOptionInstructionResponse) {
        if (packageDeliveryOptionInstructionResponse != null) {
            this.Q.q(packageDeliveryOptionInstructionResponse);
        }
    }

    private final String I1(String str, String str2) {
        return o1() ? str : str2;
    }

    private final String J0() {
        if (this.f24856c.getDetails() != null) {
            PackageDetailsDTO details = this.f24856c.getDetails();
            String string = details != null ? (this.f24856c.getHasPhotoEvent() && this.f24856c.getIsStatusDelivered()) ? this.f24860e.getString(yf.h.K2) : o1() ? details.getEvents().get(0).getDescEn() : details.getEvents().get(0).getDescFr() : null;
            return string == null ? "" : string;
        }
        if (TrackItemType.NOT_FEATURED == ig.a.f23217a.b(this.f24856c.getItemNumber())) {
            String string2 = this.f24860e.getString(yf.h.D2);
            kotlin.jvm.internal.t.d(string2);
            return string2;
        }
        String string3 = this.f24860e.getString(yf.h.P0);
        kotlin.jvm.internal.t.d(string3);
        return string3;
    }

    private final void J1() {
        if (this.f24856c.getDeliveryDate() == null) {
            this.f24869l.q(null);
            return;
        }
        DeliveryDate deliveryDate = this.f24856c.getDeliveryDate();
        this.f24870m.q(this.f24860e.getString(deliveryDate.getLabel().getResId()));
        if (deliveryDate.getDate() != null && this.f24856c.getDeliveryDate().getLabel() == DeliveryDateLabel.PICKUP_BY) {
            androidx.lifecycle.f0 f0Var = this.f24869l;
            a.C0491a c0491a = ig.a.f23217a;
            long time = deliveryDate.getDate().getTime();
            Context a10 = this.f24860e.a();
            kotlin.jvm.internal.t.f(a10, "getApplicationContext(...)");
            f0Var.q(c0491a.a(time, a10, this.f24858d));
            return;
        }
        v0();
        w0();
        if (deliveryDate.getDate() == null) {
            this.f24869l.q(this.f24860e.getString(yf.h.f52659w));
            return;
        }
        if (deliveryDate.getLabel() != DeliveryDateLabel.DELIVERED && w8.h.f40968a.h(deliveryDate.getDate().getTime())) {
            this.f24869l.q(this.f24860e.getString(yf.h.Z));
            this.f24872o.q(null);
            this.f24871n.q(null);
        } else {
            androidx.lifecycle.f0 f0Var2 = this.f24869l;
            a.C0491a c0491a2 = ig.a.f23217a;
            long time2 = deliveryDate.getDate().getTime();
            Context a11 = this.f24860e.a();
            kotlin.jvm.internal.t.f(a11, "getApplicationContext(...)");
            f0Var2.q(c0491a2.a(time2, a11, this.f24858d));
        }
    }

    private final void K1() {
        if (this.f24856c.getEligibility().getCanSetDeliveryPreference() && kotlin.jvm.internal.t.b(this.N.f(), Boolean.FALSE)) {
            this.f24874q.q(this.f24860e.getString(yf.h.f52603k3));
        }
    }

    private final void L0() {
        Date date = (Date) this.f24883z.f();
        if (date == null || date.getTime() == 0) {
            return;
        }
        this.F.q(this.f24860e.d(yf.h.f52638r3, y0(Long.valueOf(date.getTime()))));
    }

    private final void L1() {
        Double customsAmtDue;
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null || (customsAmtDue = details.getCustomsAmtDue()) == null) {
            return;
        }
        double doubleValue = customsAmtDue.doubleValue();
        if (doubleValue <= 0.0d) {
            this.f24876s.q("");
            return;
        }
        androidx.lifecycle.f0 f0Var = this.O;
        Boolean bool = Boolean.TRUE;
        f0Var.q(bool);
        this.f24878u.q(Double.valueOf(doubleValue));
        this.f24876s.q(this.f24860e.d(yf.h.f52605l0, this.f24858d.i(Double.valueOf(doubleValue))));
        if (this.f24856c.getEligibility().getHasDutyTaxes()) {
            this.f24877t.q(bool);
        }
    }

    private final void M1() {
        ExpectedDlvryDateTime expectedDlvryDateTime;
        String dlvryDate;
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null || (expectedDlvryDateTime = details.getExpectedDlvryDateTime()) == null || (dlvryDate = expectedDlvryDateTime.getDlvryDate()) == null) {
            return;
        }
        this.A.q(w8.h.f40968a.k(dlvryDate));
    }

    private final void N1() {
        this.f24873p.q(J0());
    }

    private final void P1() {
        L0();
        e1();
        U0();
        W0();
        Y0();
        b1();
        h0();
    }

    private final void S() {
        androidx.lifecycle.f0 f0Var = this.f24854a0;
        p9.h hVar = this.f24862f;
        f0Var.q(hVar != null ? Boolean.valueOf(hVar.d(p9.a.CUSTOMS_FEE_HANDLING)) : null);
        S1();
    }

    private final void S1() {
        Object f10 = this.f24854a0.f();
        Boolean bool = Boolean.TRUE;
        if (kotlin.jvm.internal.t.b(f10, bool) && kotlin.jvm.internal.t.b(this.f24855b0.f(), bool)) {
            this.f24857c0.q(bool);
        }
    }

    private final void T() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        if ((details != null ? details.getCustomsHandlingPricing() : null) != null) {
            this.f24855b0.q(Boolean.TRUE);
        }
        S1();
    }

    private final void U() {
        String Z = Z();
        if (this.f24856c.isFundCollectedForPackage()) {
            this.f24877t.q(Boolean.FALSE);
            this.f24876s.q(this.f24860e.d(yf.h.f52610m0, Z));
        }
    }

    private final void U0() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null) {
            return;
        }
        String productNmEn = details.getProductNmEn();
        if (!o1()) {
            productNmEn = details.getProductNmFr();
        }
        this.I.q(productNmEn);
    }

    private final void W0() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null) {
            return;
        }
        String refNbr1 = details.getRefNbr1();
        if (qa.d.h(refNbr1)) {
            return;
        }
        this.J.q(this.f24860e.d(yf.h.f52619o, refNbr1));
    }

    private final void Y0() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null) {
            return;
        }
        String refNbr2 = details.getRefNbr2();
        if (qa.d.h(refNbr2)) {
            return;
        }
        this.K.q(this.f24860e.d(yf.h.f52624p, refNbr2));
    }

    private final void b1() {
        Date date = (Date) this.A.f();
        if (date == null || date.getTime() == 0) {
            return;
        }
        androidx.lifecycle.f0 f0Var = this.L;
        t7.c cVar = this.f24860e;
        int i10 = yf.h.f52634r;
        a.C0491a c0491a = ig.a.f23217a;
        long time = date.getTime();
        Context a10 = this.f24860e.a();
        kotlin.jvm.internal.t.f(a10, "getApplicationContext(...)");
        f0Var.q(cVar.d(i10, c0491a.a(time, a10, this.f24858d)));
    }

    private final void e1() {
        String string = this.f24860e.getString(this.f24856c.isReturnedItem() ? yf.h.f52631q1 : yf.h.I1);
        String str = null;
        if (this.f24856c.isReturnedItem()) {
            PackageDetailsDTO details = this.f24856c.getDetails();
            if (details != null) {
                str = details.getRecipientNm();
            }
        } else {
            PackageDetailsDTO details2 = this.f24856c.getDetails();
            if (details2 != null) {
                str = details2.getCustNm();
            }
        }
        if (str == null) {
            str = this.f24860e.getString(yf.h.f52659w);
        }
        this.G.q(string + ": " + str);
    }

    private final void h0() {
        J1();
        if (((String) this.f24869l.f()) != null) {
            this.M.q(this.f24870m.f() + ": " + this.f24869l);
        }
    }

    private final PackageItemEventViewModel j1(String str) {
        for (PackageItemEventViewModel packageItemEventViewModel : w8.e0.a((List) this.E.f())) {
            if (kotlin.jvm.internal.t.b(str, packageItemEventViewModel.getCd())) {
                return packageItemEventViewModel;
            }
        }
        return null;
    }

    private final void l1() {
        this.N.q(this.f24856c.getHideDeliveryInstructionNotice() == null ? Boolean.FALSE : this.f24856c.getHideDeliveryInstructionNotice());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void r1(w3 this$0, Boolean bool) {
        kotlin.jvm.internal.t.g(this$0, "this$0");
        this$0.f24856c.setSelected(bool);
    }

    private final void v0() {
        ExpectedDlvryWindow expectedDlvryWindow;
        ExpectedDlvryWindow expectedDlvryWindow2;
        androidx.lifecycle.f0 f0Var = this.f24872o;
        PackageDetailsDTO details = this.f24856c.getDetails();
        String str = null;
        if (((details == null || (expectedDlvryWindow2 = details.getExpectedDlvryWindow()) == null) ? null : expectedDlvryWindow2.getDlvryWindowEOD()) != null) {
            PackageDetailsDTO details2 = this.f24856c.getDetails();
            Boolean dlvryWindowEOD = (details2 == null || (expectedDlvryWindow = details2.getExpectedDlvryWindow()) == null) ? null : expectedDlvryWindow.getDlvryWindowEOD();
            kotlin.jvm.internal.t.d(dlvryWindowEOD);
            if (dlvryWindowEOD.booleanValue()) {
                str = this.f24860e.getString(yf.h.f52570e0);
            }
        }
        f0Var.q(str);
    }

    private final void w0() {
        DeliveryDate deliveryDate = this.f24856c.getDeliveryDate();
        ExpectedDlvryWindow deliveryWindow = deliveryDate != null ? deliveryDate.getDeliveryWindow() : null;
        if (deliveryWindow != null) {
            String dlvryWindowStartTime = deliveryWindow.getDlvryWindowStartTime();
            if (dlvryWindowStartTime == null || dlvryWindowStartTime.length() == 0) {
                return;
            }
            String dlvryWindowEndTime = deliveryWindow.getDlvryWindowEndTime();
            if (dlvryWindowEndTime == null || dlvryWindowEndTime.length() == 0) {
                return;
            }
            this.f24871n.q(this.f24860e.d(yf.h.f52575f0, qa.d.f(deliveryWindow.getDlvryWindowStartTime(), this.f24858d.d()), qa.d.f(deliveryWindow.getDlvryWindowEndTime(), this.f24858d.d())));
        }
    }

    private final String y0(Long l10) {
        String J;
        String J2;
        String J3;
        String J4;
        String J5;
        String J6;
        Calendar calendar = Calendar.getInstance();
        kotlin.jvm.internal.t.d(l10);
        calendar.setTimeInMillis(l10.longValue());
        Calendar calendar2 = Calendar.getInstance();
        DateFormat dateInstance = DateFormat.getDateInstance(2, this.f24858d.d());
        boolean z10 = calendar2.get(2) == calendar.get(2) && calendar2.get(1) == calendar.get(1);
        if (!o1()) {
            if (z10 && calendar2.get(5) == calendar.get(5)) {
                return this.f24860e.getString(yf.h.f52677z2) + " " + ((Object) android.text.format.DateFormat.format("HH'h 'mm", calendar));
            }
            if (!z10 || calendar2.get(5) - calendar.get(5) != 1) {
                return dateInstance.format(calendar.getTime());
            }
            return this.f24860e.getString(yf.h.D3) + " " + ((Object) android.text.format.DateFormat.format("HH'h 'mm", calendar));
        }
        if (z10 && calendar2.get(5) == calendar.get(5)) {
            String string = this.f24860e.getString(yf.h.f52677z2);
            J5 = kotlin.text.y.J(android.text.format.DateFormat.format("h:mm aa", calendar).toString(), "AM", "am", false, 4, null);
            J6 = kotlin.text.y.J(J5, "PM", "pm", false, 4, null);
            return string + " " + J6;
        }
        if (!z10 || calendar2.get(5) - calendar.get(5) != 1) {
            String format = dateInstance.format(calendar.getTime());
            kotlin.jvm.internal.t.f(format, "format(...)");
            J = kotlin.text.y.J(format, "AM", "am", false, 4, null);
            J2 = kotlin.text.y.J(J, "PM", "pm", false, 4, null);
            return J2;
        }
        String string2 = this.f24860e.getString(yf.h.D3);
        J3 = kotlin.text.y.J(android.text.format.DateFormat.format("h:mm aa", calendar).toString(), "AM", "am", false, 4, null);
        J4 = kotlin.text.y.J(J3, "PM", "pm", false, 4, null);
        return string2 + " " + J4;
    }

    private final String y1(int i10, int i11) {
        StringBuilder sb2 = new StringBuilder();
        sb2.append(this.f24860e.getString(yf.h.R0));
        sb2.append(" ");
        sb2.append(i10);
        sb2.append(" ");
        sb2.append(this.f24860e.getString(yf.h.f52563c3));
        sb2.append(" ");
        sb2.append(i11);
        if (qa.d.h(this.f24856c.getUserDescription())) {
            sb2.append(". ");
            sb2.append(this.f24860e.getString(yf.h.f52579g));
            sb2.append(" ");
            sb2.append(this.f24856c.getItemNumber());
        } else {
            sb2.append(". ");
            sb2.append(this.f24856c.getUserDescription());
        }
        if (!qa.d.h((String) this.f24873p.f())) {
            sb2.append(". ");
            sb2.append((String) this.f24873p.f());
        }
        if (!qa.d.h((String) this.G.f())) {
            sb2.append(". ");
            sb2.append((String) this.G.f());
        }
        if (!qa.d.h((String) this.f24875r.f())) {
            sb2.append(". ");
            sb2.append((String) this.f24875r.f());
        }
        if (O1()) {
            if (!qa.d.h((String) this.f24870m.f())) {
                sb2.append(". ");
                sb2.append((String) this.f24870m.f());
            }
            if (!qa.d.h((String) this.f24869l.f())) {
                sb2.append(" ");
                sb2.append((String) this.f24869l.f());
            }
            if (!qa.d.h((String) this.f24871n.f())) {
                sb2.append(". ");
                sb2.append((String) this.f24871n.f());
            }
            if (!qa.d.h((String) this.f24872o.f())) {
                sb2.append(" ");
                sb2.append((String) this.f24872o.f());
            }
        }
        if (!qa.d.h((String) this.f24874q.f())) {
            sb2.append(". ");
            sb2.append((String) this.f24874q.f());
        }
        if (!qa.d.h((String) this.f24876s.f())) {
            sb2.append(". ");
            sb2.append((String) this.f24876s.f());
        }
        String sb3 = sb2.toString();
        kotlin.jvm.internal.t.f(sb3, "toString(...)");
        return sb3;
    }

    private final boolean z1(String str, String[] strArr) {
        if (strArr == null) {
            return false;
        }
        Iterator a10 = kotlin.jvm.internal.c.a(strArr);
        while (a10.hasNext()) {
            if (kotlin.jvm.internal.t.b((String) a10.next(), str)) {
                return true;
            }
        }
        return false;
    }

    public final String A0(long j10, boolean z10, boolean z11) {
        String J;
        String J2;
        String J3;
        String J4;
        String J5;
        String J6;
        String J7;
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(j10);
        Calendar calendar2 = Calendar.getInstance();
        String I1 = z10 ? I1("MMMM d", "d MMMM") : I1("MMM. d", "d MMM.");
        DateFormat dateInstance = DateFormat.getDateInstance(1, this.f24858d.d());
        boolean z12 = calendar2.get(2) == calendar.get(2) && calendar2.get(1) == calendar.get(1);
        if (!o1()) {
            if (z12 && calendar2.get(5) == calendar.get(5)) {
                return this.f24860e.getString(yf.h.f52677z2) + " " + ((Object) android.text.format.DateFormat.format("HH 'h 'mm", calendar));
            }
            if (!z12 || calendar2.get(5) - calendar.get(5) != 1) {
                return this.f24860e.d(yf.h.Y, dateInstance.format(calendar.getTime()), android.text.format.DateFormat.format("HH 'h 'mm", calendar).toString());
            }
            return this.f24860e.getString(yf.h.D3) + " " + ((Object) android.text.format.DateFormat.format("HH 'h 'mm", calendar));
        }
        if (z11 && z12 && calendar2.get(5) == calendar.get(5)) {
            String string = this.f24860e.getString(yf.h.f52677z2);
            String format = new SimpleDateFormat("h:mm aa", Locale.US).format(calendar.getTime());
            kotlin.jvm.internal.t.f(format, "format(...)");
            J6 = kotlin.text.y.J(format, "AM", "am", false, 4, null);
            J7 = kotlin.text.y.J(J6, "PM", "pm", false, 4, null);
            return string + " " + J7;
        }
        if (z11 && z12 && calendar2.get(5) - calendar.get(5) == 1) {
            String string2 = this.f24860e.getString(yf.h.D3);
            String format2 = new SimpleDateFormat("h:mm aa", Locale.US).format(calendar.getTime());
            kotlin.jvm.internal.t.f(format2, "format(...)");
            J4 = kotlin.text.y.J(format2, "AM", "am", false, 4, null);
            J5 = kotlin.text.y.J(J4, "PM", "pm", false, 4, null);
            return string2 + " " + J5;
        }
        t7.c cVar = this.f24860e;
        int i10 = yf.h.Y;
        CharSequence format3 = android.text.format.DateFormat.format(I1, calendar);
        String format4 = new SimpleDateFormat("h:mm aa", Locale.US).format(calendar.getTime());
        kotlin.jvm.internal.t.f(format4, "format(...)");
        J = kotlin.text.y.J(format4, "AM", "am", false, 4, null);
        J2 = kotlin.text.y.J(J, "PM", "pm", false, 4, null);
        String d10 = cVar.d(i10, format3, J2);
        kotlin.jvm.internal.t.f(d10, "getString(...)");
        J3 = kotlin.text.y.J(d10, "..", ".", false, 4, null);
        return J3;
    }

    public final void A1() {
        this.W.s();
    }

    public final androidx.lifecycle.f0 B0() {
        return this.R;
    }

    public final void B1(String deliveryDate) {
        kotlin.jvm.internal.t.g(deliveryDate, "deliveryDate");
        this.Y.q(deliveryDate);
    }

    public final androidx.lifecycle.f0 C0() {
        return this.N;
    }

    public final androidx.lifecycle.f0 D0() {
        return this.P;
    }

    public final boolean E0() {
        Boolean bool = (Boolean) this.f24882y.f();
        if (bool == null) {
            return false;
        }
        return bool.booleanValue();
    }

    public final androidx.lifecycle.a0 F0() {
        return this.T;
    }

    public final PackageItemModel G0() {
        return this.f24856c;
    }

    public final void G1(int i10, int i11, boolean z10, int i12) {
        if (i12 == 0) {
            this.f24882y.q(Boolean.TRUE);
        }
        if (z10) {
            this.f24880w.q(E1(i10 + 1, i11));
        } else {
            this.f24880w.q(y1(i10 + 1, i11));
        }
    }

    public final androidx.lifecycle.f0 H0() {
        return this.f24867j;
    }

    public final androidx.lifecycle.f0 I0() {
        return this.f24873p;
    }

    public final androidx.lifecycle.f0 K0() {
        return this.F;
    }

    public final androidx.lifecycle.a0 M0() {
        return this.Z;
    }

    public final Bitmap N0(int i10, int i11) {
        return R((String) this.D.f(), i10, i11);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.lifecycle.z0
    public void O() {
        this.f24879v.o(this.f24859d0);
        super.O();
    }

    public final String O0() {
        if (!Q1()) {
            return "";
        }
        t7.c cVar = this.f24860e;
        int i10 = yf.h.A;
        Object[] objArr = new Object[1];
        ca.a aVar = this.f24858d;
        PackageDetailsDTO details = this.f24856c.getDetails();
        objArr[0] = aVar.i(details != null ? details.getCodAmtDue() : null);
        String d10 = cVar.d(i10, objArr);
        kotlin.jvm.internal.t.d(d10);
        return d10;
    }

    public final boolean O1() {
        return (u1() || this.f24869l.f() == null) ? false : true;
    }

    public final String P0() {
        return this.f24860e.getString(yf.h.D) + this.D.f();
    }

    public final String Q0() {
        Double customsAmtDue;
        if (!R1()) {
            return "";
        }
        t7.c cVar = this.f24860e;
        int i10 = yf.h.A;
        Object[] objArr = new Object[1];
        ca.a aVar = this.f24858d;
        PackageDetailsDTO details = this.f24856c.getDetails();
        objArr[0] = aVar.i(Double.valueOf((details == null || (customsAmtDue = details.getCustomsAmtDue()) == null) ? 0.0d : customsAmtDue.doubleValue()));
        return cVar.d(i10, objArr);
    }

    public final boolean Q1() {
        Double codAmtDue;
        PackageDetailsDTO details = this.f24856c.getDetails();
        return (details == null || (codAmtDue = details.getCodAmtDue()) == null || codAmtDue.doubleValue() <= 0.0d) ? false : true;
    }

    public final Bitmap R(String str, int i10, int i11) {
        if (qa.d.h(str)) {
            return null;
        }
        yk.l lVar = new yk.l();
        try {
            EnumMap enumMap = new EnumMap(yk.g.class);
            enumMap.put((EnumMap) yk.g.CHARACTER_SET, (yk.g) "UTF-8");
            enumMap.put((EnumMap) yk.g.MARGIN, (yk.g) 0);
            fl.b a10 = lVar.a(str, yk.a.CODE_128, i10, i11, enumMap);
            if (a10 != null) {
                int n10 = a10.n();
                int j10 = a10.j();
                int[] iArr = new int[n10 * j10];
                for (int i12 = 0; i12 < j10; i12++) {
                    int i13 = i12 * n10;
                    for (int i14 = 0; i14 < n10; i14++) {
                        iArr[i13 + i14] = a10.f(i14, i12) ? this.f24863f0 : this.f24861e0;
                    }
                }
                Bitmap createBitmap = Bitmap.createBitmap(n10, j10, Bitmap.Config.ARGB_8888);
                kotlin.jvm.internal.t.f(createBitmap, "createBitmap(...)");
                createBitmap.setPixels(iArr, 0, n10, 0, 0, n10, j10);
                return createBitmap;
            }
        } catch (yk.v unused) {
        }
        return null;
    }

    public final String R0() {
        Long S0 = S0();
        return S0 != null ? z0(S0.longValue()) : "";
    }

    public final boolean R1() {
        Double customsAmtDue;
        PackageDetailsDTO details = this.f24856c.getDetails();
        return (details == null || (customsAmtDue = details.getCustomsAmtDue()) == null || customsAmtDue.doubleValue() <= 0.0d) ? false : true;
    }

    public final Long S0() {
        String str;
        PackageItemEventViewModel packageItemEventViewModel;
        DateTime G;
        Iterator it = w8.e0.a((List) this.E.f()).iterator();
        do {
            if (!it.hasNext()) {
                Event event = this.f24856c.getLastEvent().getEvent();
                if (event == null || (str = event.getCd()) == null) {
                    str = "";
                }
                if (!z1(str, new String[]{"1701"})) {
                    return null;
                }
                Event event2 = this.f24856c.getLastEvent().getEvent();
                return Long.valueOf(new DateTime(event2 != null ? event2.getDatetime() : null).G(15).getMillis());
            }
            packageItemEventViewModel = (PackageItemEventViewModel) it.next();
        } while (!kotlin.jvm.internal.t.b("1701", packageItemEventViewModel.getCd()));
        Datetime datetime = packageItemEventViewModel.getDatetime();
        String date = datetime != null ? datetime.getDate() : null;
        Datetime datetime2 = packageItemEventViewModel.getDatetime();
        DateTime C1 = C1(date, datetime2 != null ? datetime2.getTime() : null);
        return Long.valueOf((C1 == null || (G = C1.G(15)) == null) ? -1L : G.getMillis());
    }

    public final androidx.lifecycle.f0 T0() {
        return this.I;
    }

    public final androidx.lifecycle.f0 V() {
        return this.f24875r;
    }

    public final androidx.lifecycle.f0 V0() {
        return this.J;
    }

    public final androidx.lifecycle.a0 W() {
        return this.f24881x;
    }

    public final String X() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        String correctedPostalCode = details != null ? details.getCorrectedPostalCode() : null;
        return correctedPostalCode == null ? "" : correctedPostalCode;
    }

    public final androidx.lifecycle.f0 X0() {
        return this.K;
    }

    public final androidx.lifecycle.f0 Y() {
        return this.Q;
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0033  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x0040  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final String Z() {
        boolean z10;
        PackageDetailsDTO details = this.f24856c.getDetails();
        Double d10 = null;
        if ((details != null ? details.getCustomsAmtDue() : null) != null) {
            PackageDetailsDTO details2 = this.f24856c.getDetails();
            Double customsAmtDue = details2 != null ? details2.getCustomsAmtDue() : null;
            kotlin.jvm.internal.t.d(customsAmtDue);
            if (customsAmtDue.doubleValue() > 0.0d) {
                z10 = true;
                ca.a aVar = this.f24858d;
                if (z10) {
                    d10 = Double.valueOf(0.0d);
                } else {
                    PackageDetailsDTO details3 = this.f24856c.getDetails();
                    if (details3 != null) {
                        d10 = details3.getCustomsAmtDue();
                    }
                }
                return aVar.i(d10);
            }
        }
        z10 = false;
        ca.a aVar2 = this.f24858d;
        if (z10) {
        }
        return aVar2.i(d10);
    }

    public final androidx.lifecycle.f0 Z0() {
        return this.C;
    }

    public final androidx.lifecycle.f0 a0() {
        return this.f24878u;
    }

    public final androidx.lifecycle.f0 a1() {
        return this.L;
    }

    public final androidx.lifecycle.f0 b0() {
        return this.f24876s;
    }

    public final CustomsHandlingPricing c0() {
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details != null) {
            return details.getCustomsHandlingPricing();
        }
        return null;
    }

    public final String c1() {
        LocationAddr shipToAddr;
        PackageDetailsDTO details = this.f24856c.getDetails();
        String postCd = (details == null || (shipToAddr = details.getShipToAddr()) == null) ? null : shipToAddr.getPostCd();
        return postCd == null ? "" : postCd;
    }

    public final androidx.lifecycle.f0 d0() {
        return this.f24869l;
    }

    public final androidx.lifecycle.f0 d1() {
        return this.G;
    }

    public final androidx.lifecycle.f0 e0() {
        return this.f24870m;
    }

    public final androidx.lifecycle.f0 f0() {
        return this.f24874q;
    }

    public final androidx.lifecycle.a0 f1() {
        return this.X;
    }

    public final androidx.lifecycle.f0 g0() {
        return this.M;
    }

    public final androidx.lifecycle.f0 g1() {
        return this.O;
    }

    public final androidx.lifecycle.f0 h1() {
        return this.f24857c0;
    }

    public final String i0() {
        return this.f24860e.getString(k1() ? yf.h.S : yf.h.R);
    }

    public final androidx.lifecycle.f0 i1() {
        return this.f24868k;
    }

    public final String j0() {
        return this.f24860e.getString(yf.h.T);
    }

    public final String k0() {
        String str = k1() ? "*" : " ";
        t7.c cVar = this.f24860e;
        int i10 = yf.h.Q;
        Object[] objArr = new Object[2];
        ca.a aVar = this.f24858d;
        String str2 = (String) this.f24875r.f();
        objArr[0] = aVar.i(str2 != null ? Double.valueOf(Double.parseDouble(str2)) : null);
        objArr[1] = str;
        return cVar.d(i10, objArr);
    }

    public final boolean k1() {
        return true;
    }

    public final String l0() {
        String str = k1() ? "*" : " ";
        t7.c cVar = this.f24860e;
        int i10 = yf.h.f52655v0;
        Object[] objArr = new Object[2];
        ca.a aVar = this.f24858d;
        String str2 = (String) this.f24875r.f();
        objArr[0] = aVar.i(str2 != null ? Double.valueOf(Double.parseDouble(str2)) : null);
        objArr[1] = str;
        return cVar.d(i10, objArr);
    }

    public final androidx.lifecycle.f0 m0() {
        return this.D;
    }

    public final androidx.lifecycle.f0 m1() {
        return this.f24877t;
    }

    public final PackageItemEventViewModel n0() {
        return j1("1210");
    }

    public final boolean n1() {
        boolean z10;
        J1();
        if (this.f24869l.f() != null) {
            z10 = kotlin.text.y.z((String) this.f24869l.f(), this.f24860e.getString(yf.h.Z), true);
            if (z10) {
                return true;
            }
        }
        return false;
    }

    public final PackageItemEventViewModel o0() {
        return j1("1216");
    }

    public final boolean o1() {
        return this.f24858d.b();
    }

    public final PackageItemEventViewModel p0() {
        return j1("1214");
    }

    public final androidx.lifecycle.a0 p1() {
        return this.V;
    }

    public final String q0() {
        List list = (List) this.E.f();
        if (list == null || !(!list.isEmpty())) {
            return null;
        }
        Iterator it = list.iterator();
        while (it.hasNext()) {
            String cd2 = ((PackageItemEventViewModel) it.next()).getCd();
            kotlin.jvm.internal.t.d(cd2);
            if (this.z1(cd2, x3.b())) {
                try {
                    return String.valueOf(Integer.parseInt(r1.getCd()) - 1200);
                } catch (Exception e10) {
                    tr.a.f36618a.d(e10, e10.getMessage(), new Object[0]);
                }
            }
        }
        return null;
    }

    public final boolean q1() {
        Double customsAmtDue;
        PackageDetailsDTO details = this.f24856c.getDetails();
        if (details == null || (customsAmtDue = details.getCustomsAmtDue()) == null || customsAmtDue.doubleValue() <= 0.0d) {
            return false;
        }
        PackageDTPaymentDetails packageDTPaymentDetails = this.f24856c.getPackageDTPaymentDetails();
        return (packageDTPaymentDetails != null ? packageDTPaymentDetails.getDtPaymentDate() : null) == null && n0() == null && !this.f24856c.isFundCollected() && !this.f24856c.getEligibility().getHasDutyTaxes();
    }

    public final String r0() {
        List<PackageItemEventViewModel> list = (List) this.E.f();
        if (list == null || !(!list.isEmpty())) {
            return null;
        }
        for (PackageItemEventViewModel packageItemEventViewModel : list) {
            String cd2 = packageItemEventViewModel.getCd();
            kotlin.jvm.internal.t.d(cd2);
            if (z1(cd2, x3.b())) {
                return this.f24858d.b() ? packageItemEventViewModel.getDescEn() : packageItemEventViewModel.getDescFr();
            }
        }
        return null;
    }

    public final androidx.lifecycle.f0 s0() {
        return this.E;
    }

    public final androidx.lifecycle.f0 s1() {
        return this.f24879v;
    }

    public final androidx.lifecycle.f0 t0() {
        return this.f24871n;
    }

    public final androidx.lifecycle.f0 t1() {
        return this.f24866i;
    }

    public final androidx.lifecycle.f0 u0() {
        return this.f24872o;
    }

    public final boolean u1() {
        ArrayList arrayList = new ArrayList();
        PackageDetailsDTO details = this.f24856c.getDetails();
        if ((details != null ? details.getEvents() : null) != null) {
            PackageDetailsDTO details2 = this.f24856c.getDetails();
            List<Event> events = details2 != null ? details2.getEvents() : null;
            kotlin.jvm.internal.t.d(events);
            Iterator<Event> it = events.iterator();
            while (it.hasNext()) {
                arrayList.add(it.next().getCd());
            }
        }
        List o10 = qa.d.o(qa.d.s(arrayList), String.class);
        return (this.f24856c.getLastEvent() instanceof PackageEventType.ELECTRONIC_INFOR_SHIPPER) && o10 != null && o10.size() == 1;
    }

    public final boolean v1() {
        return this.f24856c.getLastEvent() instanceof PackageEventType.AVAILABLE_FOR_PICKUP;
    }

    public final boolean w1() {
        return this.f24856c.getLastEvent() instanceof PackageEventType.DELIVERED;
    }

    public final String x0(long j10) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(j10);
        return android.text.format.DateFormat.format(I1("MMMM d, yyyy", "d MMMM yyyy"), calendar).toString();
    }

    public final boolean x1() {
        return this.f24856c.getLastEvent() instanceof PackageEventType.UNKNOWN;
    }

    public final String z0(long j10) {
        String J;
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(j10);
        Calendar calendar2 = Calendar.getInstance();
        boolean z10 = calendar2.get(1) == calendar.get(1);
        if (z10 && calendar2.get(6) == calendar.get(6)) {
            return this.f24860e.getString(yf.h.f52672y2);
        }
        if (z10 && calendar2.get(6) - calendar.get(6) == 1) {
            return this.f24860e.getString(yf.h.C3);
        }
        if (z10 && calendar2.get(6) - calendar.get(6) == -1) {
            return this.f24860e.getString(yf.h.A2);
        }
        String format = new SimpleDateFormat(z10 ? I1("MMM. d", "d MMM.") : I1("MMM. d yyyy", "d MMM. yyyy"), this.f24858d.d()).format(calendar.getTime());
        kotlin.jvm.internal.t.f(format, "format(...)");
        J = kotlin.text.y.J(format, "..", ".", false, 4, null);
        return J;
    }

    /* JADX WARN: Illegal instructions before constructor call */
    /* JADX WARN: Removed duplicated region for block: B:10:0x01a4  */
    /* JADX WARN: Removed duplicated region for block: B:13:0x01d1  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x0200  */
    /* JADX WARN: Removed duplicated region for block: B:25:0x01a9  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public w3(PackageItemModel itemModel, ca.a languageService, t7.c contextService, o9.c cpEventbus, p9.h hVar, g9.d sessionRepository, ka.b userProfileRepository) {
        super((Application) r0);
        boolean z10;
        PackageDetailsDTO details;
        boolean C;
        kotlin.jvm.internal.t.g(itemModel, "itemModel");
        kotlin.jvm.internal.t.g(languageService, "languageService");
        kotlin.jvm.internal.t.g(contextService, "contextService");
        kotlin.jvm.internal.t.g(cpEventbus, "cpEventbus");
        kotlin.jvm.internal.t.g(sessionRepository, "sessionRepository");
        kotlin.jvm.internal.t.g(userProfileRepository, "userProfileRepository");
        Context a10 = contextService.a();
        kotlin.jvm.internal.t.e(a10, "null cannot be cast to non-null type android.app.Application");
        this.f24856c = itemModel;
        this.f24858d = languageService;
        this.f24860e = contextService;
        this.f24862f = hVar;
        this.f24864g = sessionRepository;
        this.f24865h = userProfileRepository;
        Boolean bool = Boolean.FALSE;
        this.f24866i = new androidx.lifecycle.f0(bool);
        androidx.lifecycle.f0 f0Var = new androidx.lifecycle.f0();
        this.f24867j = f0Var;
        androidx.lifecycle.f0 f0Var2 = new androidx.lifecycle.f0();
        this.f24868k = f0Var2;
        this.f24869l = new androidx.lifecycle.f0();
        this.f24870m = new androidx.lifecycle.f0();
        this.f24871n = new androidx.lifecycle.f0();
        this.f24872o = new androidx.lifecycle.f0();
        this.f24873p = new androidx.lifecycle.f0();
        this.f24874q = new androidx.lifecycle.f0();
        this.f24875r = new androidx.lifecycle.f0();
        this.f24876s = new androidx.lifecycle.f0();
        this.f24877t = new androidx.lifecycle.f0(bool);
        this.f24878u = new androidx.lifecycle.f0();
        androidx.lifecycle.f0 f0Var3 = new androidx.lifecycle.f0();
        this.f24879v = f0Var3;
        androidx.lifecycle.f0 f0Var4 = new androidx.lifecycle.f0();
        this.f24880w = f0Var4;
        this.f24881x = f0Var4;
        androidx.lifecycle.f0 f0Var5 = new androidx.lifecycle.f0();
        this.f24882y = f0Var5;
        androidx.lifecycle.f0 f0Var6 = new androidx.lifecycle.f0();
        this.f24883z = f0Var6;
        this.A = new androidx.lifecycle.f0();
        this.B = new androidx.lifecycle.f0();
        androidx.lifecycle.f0 f0Var7 = new androidx.lifecycle.f0();
        this.C = f0Var7;
        androidx.lifecycle.f0 f0Var8 = new androidx.lifecycle.f0();
        this.D = f0Var8;
        this.E = new androidx.lifecycle.f0();
        this.F = new androidx.lifecycle.f0();
        this.G = new androidx.lifecycle.f0();
        this.H = new androidx.lifecycle.f0();
        this.I = new androidx.lifecycle.f0();
        this.J = new androidx.lifecycle.f0();
        this.K = new androidx.lifecycle.f0();
        this.L = new androidx.lifecycle.f0();
        this.M = new androidx.lifecycle.f0();
        this.N = new androidx.lifecycle.f0();
        this.O = new androidx.lifecycle.f0();
        this.P = new androidx.lifecycle.f0(bool);
        this.Q = new androidx.lifecycle.f0();
        androidx.lifecycle.f0 f0Var9 = new androidx.lifecycle.f0();
        this.R = f0Var9;
        androidx.lifecycle.f0 f0Var10 = new androidx.lifecycle.f0();
        this.S = f0Var10;
        this.T = f0Var10;
        androidx.lifecycle.f0 f0Var11 = new androidx.lifecycle.f0();
        this.U = f0Var11;
        this.V = f0Var11;
        l8.g gVar = new l8.g();
        this.W = gVar;
        this.X = gVar;
        l8.g gVar2 = new l8.g();
        this.Y = gVar2;
        this.Z = gVar2;
        this.f24854a0 = new androidx.lifecycle.f0(bool);
        this.f24855b0 = new androidx.lifecycle.f0(bool);
        this.f24857c0 = new androidx.lifecycle.f0(bool);
        androidx.lifecycle.g0 g0Var = new androidx.lifecycle.g0() { // from class: jg.v3
            @Override // androidx.lifecycle.g0
            public final void d(Object obj) {
                w3.r1(w3.this, (Boolean) obj);
            }
        };
        this.f24859d0 = g0Var;
        S();
        T();
        f0Var7.q(itemModel.getRetailLocID());
        PackageDetailsDTO details2 = itemModel.getDetails();
        f0Var8.q(details2 != null ? details2.getDnc() : null);
        D1();
        String userDescription = itemModel.getUserDescription();
        boolean z11 = false;
        if (userDescription != null) {
            C = kotlin.text.y.C(userDescription);
            if (!C) {
                z10 = false;
                f0Var.q(z10 ? itemModel.getUserDescription() : itemModel.getItemNumber());
                J1();
                f0Var2.q(itemModel.getStatusIcon().getResId());
                N1();
                f0Var6.q(itemModel.getLastUpdatedWithBackend());
                l1();
                details = itemModel.getDetails();
                if (details != null) {
                    F1();
                    K1();
                    L1();
                    M1();
                    f0Var9.q(details.getFundsCollected());
                    U();
                }
                f0Var3.q(itemModel.getSelected());
                f0Var3.k(g0Var);
                cpEventbus.a(this);
                f0Var5.q(bool);
                P1();
                if (itemModel.getCurrentDeliveryPreferenceJson() != null) {
                    H1((PackageDeliveryOptionInstructionResponse) qa.d.p(itemModel.getCurrentDeliveryPreferenceJson(), PackageDeliveryOptionInstructionResponse.class));
                }
                if (itemModel.isItemSourceSNF() && !itemModel.isSNFItemRead()) {
                    z11 = true;
                }
                f0Var10.q(Boolean.valueOf(z11));
                f0Var11.q(Boolean.valueOf(itemModel.isFlaggedAsNotMine()));
                this.f24861e0 = -1;
                this.f24863f0 = -16777216;
            }
        }
        z10 = true;
        f0Var.q(z10 ? itemModel.getUserDescription() : itemModel.getItemNumber());
        J1();
        f0Var2.q(itemModel.getStatusIcon().getResId());
        N1();
        f0Var6.q(itemModel.getLastUpdatedWithBackend());
        l1();
        details = itemModel.getDetails();
        if (details != null) {
        }
        f0Var3.q(itemModel.getSelected());
        f0Var3.k(g0Var);
        cpEventbus.a(this);
        f0Var5.q(bool);
        P1();
        if (itemModel.getCurrentDeliveryPreferenceJson() != null) {
        }
        if (itemModel.isItemSourceSNF()) {
            z11 = true;
        }
        f0Var10.q(Boolean.valueOf(z11));
        f0Var11.q(Boolean.valueOf(itemModel.isFlaggedAsNotMine()));
        this.f24861e0 = -1;
        this.f24863f0 = -16777216;
    }
}
