package zf;

import android.content.res.Resources;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Space;
import android.widget.TextView;
import androidx.core.widget.NestedScrollView;
import androidx.databinding.n;
import ca.canadapost.core.data.db.cupboard.model.OutletHours;
import ca.canadapost.module.track.model.PackageItemModel;
import cg.a;
import java.util.List;

/* loaded from: classes4.dex */
public class x2 extends w2 implements a.InterfaceC0282a {

    /* renamed from: w0, reason: collision with root package name */
    private static final n.i f53447w0;

    /* renamed from: x0, reason: collision with root package name */
    private static final SparseIntArray f53448x0;

    /* renamed from: l0, reason: collision with root package name */
    private final RelativeLayout f53449l0;

    /* renamed from: m0, reason: collision with root package name */
    private final w3 f53450m0;

    /* renamed from: n0, reason: collision with root package name */
    private final w3 f53451n0;

    /* renamed from: o0, reason: collision with root package name */
    private final w3 f53452o0;

    /* renamed from: p0, reason: collision with root package name */
    private final w3 f53453p0;

    /* renamed from: q0, reason: collision with root package name */
    private final w3 f53454q0;

    /* renamed from: r0, reason: collision with root package name */
    private final w3 f53455r0;

    /* renamed from: s0, reason: collision with root package name */
    private final w3 f53456s0;

    /* renamed from: t0, reason: collision with root package name */
    private final View.OnClickListener f53457t0;

    /* renamed from: u0, reason: collision with root package name */
    private final View.OnClickListener f53458u0;

    /* renamed from: v0, reason: collision with root package name */
    private long f53459v0;

    static {
        n.i iVar = new n.i(44);
        f53447w0 = iVar;
        int i10 = yf.e.f52525o0;
        iVar.a(22, new String[]{"track_dnc_detail_hours_list", "track_dnc_detail_hours_list", "track_dnc_detail_hours_list", "track_dnc_detail_hours_list", "track_dnc_detail_hours_list", "track_dnc_detail_hours_list", "track_dnc_detail_hours_list"}, new int[]{24, 25, 26, 27, 28, 29, 30}, new int[]{i10, i10, i10, i10, i10, i10, i10});
        SparseIntArray sparseIntArray = new SparseIntArray();
        f53448x0 = sparseIntArray;
        sparseIntArray.put(yf.d.E0, 23);
        sparseIntArray.put(yf.d.B, 31);
        sparseIntArray.put(yf.d.H, 32);
        sparseIntArray.put(yf.d.F, 33);
        sparseIntArray.put(yf.d.E, 34);
        sparseIntArray.put(yf.d.D, 35);
        sparseIntArray.put(yf.d.C, 36);
        sparseIntArray.put(yf.d.Q0, 37);
        sparseIntArray.put(yf.d.A, 38);
        sparseIntArray.put(yf.d.f52477t1, 39);
        sparseIntArray.put(yf.d.G, 40);
        sparseIntArray.put(yf.d.f52481v, 41);
        sparseIntArray.put(yf.d.f52443i0, 42);
        sparseIntArray.put(yf.d.I, 43);
    }

    public x2(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 44, f53447w0, f53448x0));
    }

    private boolean V(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 2;
        }
        return true;
    }

    private boolean W(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 1;
        }
        return true;
    }

    private boolean X(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 4;
        }
        return true;
    }

    private boolean Y(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 8;
        }
        return true;
    }

    private boolean Z(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 128;
        }
        return true;
    }

    private boolean a0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 64;
        }
        return true;
    }

    private boolean b0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 32;
        }
        return true;
    }

    private boolean c0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.f53459v0 |= 16;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.f53459v0 = 512L;
        }
        this.f53450m0.B();
        this.f53451n0.B();
        this.f53452o0.B();
        this.f53453p0.B();
        this.f53454q0.B();
        this.f53455r0.B();
        this.f53456s0.B();
        J();
    }

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        switch (i10) {
            case 0:
                return W((androidx.lifecycle.f0) obj, i11);
            case 1:
                return V((androidx.lifecycle.f0) obj, i11);
            case 2:
                return X((androidx.lifecycle.f0) obj, i11);
            case 3:
                return Y((androidx.lifecycle.f0) obj, i11);
            case 4:
                return c0((androidx.lifecycle.f0) obj, i11);
            case 5:
                return b0((androidx.lifecycle.f0) obj, i11);
            case 6:
                return a0((androidx.lifecycle.f0) obj, i11);
            case 7:
                return Z((androidx.lifecycle.f0) obj, i11);
            default:
                return false;
        }
    }

    @Override // androidx.databinding.n
    public void O(androidx.lifecycle.u uVar) {
        super.O(uVar);
        this.f53450m0.O(uVar);
        this.f53451n0.O(uVar);
        this.f53452o0.O(uVar);
        this.f53453p0.O(uVar);
        this.f53454q0.O(uVar);
        this.f53455r0.O(uVar);
        this.f53456s0.O(uVar);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d != i10) {
            return false;
        }
        U((jg.n3) obj);
        return true;
    }

    @Override // zf.w2
    public void U(jg.n3 n3Var) {
        this.f53446k0 = n3Var;
        synchronized (this) {
            this.f53459v0 |= 256;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            jg.n3 n3Var = this.f53446k0;
            if (n3Var != null) {
                n3Var.U();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        jg.n3 n3Var2 = this.f53446k0;
        if (n3Var2 != null) {
            n3Var2.h0();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:155:0x02d6  */
    /* JADX WARN: Removed duplicated region for block: B:158:0x0276  */
    /* JADX WARN: Removed duplicated region for block: B:163:0x022c  */
    /* JADX WARN: Removed duplicated region for block: B:169:0x01b3  */
    /* JADX WARN: Removed duplicated region for block: B:178:0x0162  */
    /* JADX WARN: Removed duplicated region for block: B:19:0x0083  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x0178  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x01bf  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x01e3  */
    /* JADX WARN: Removed duplicated region for block: B:86:0x023a  */
    /* JADX WARN: Removed duplicated region for block: B:94:0x0289  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        String str;
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        String str7;
        String str8;
        String str9;
        String str10;
        String str11;
        String str12;
        OutletHours outletHours;
        OutletHours outletHours2;
        OutletHours outletHours3;
        OutletHours outletHours4;
        OutletHours outletHours5;
        OutletHours outletHours6;
        OutletHours outletHours7;
        String str13;
        int i10;
        int i11;
        int i12;
        int i13;
        int i14;
        int i15;
        OutletHours outletHours8;
        OutletHours outletHours9;
        OutletHours outletHours10;
        OutletHours outletHours11;
        OutletHours outletHours12;
        OutletHours outletHours13;
        OutletHours outletHours14;
        String str14;
        String str15;
        String str16;
        String str17;
        String str18;
        String str19;
        long j11;
        int i16;
        String str20;
        String str21;
        String str22;
        String str23;
        long j12;
        String str24;
        OutletHours outletHours15;
        int i17;
        int i18;
        int i19;
        int i20;
        String str25;
        String str26;
        String str27;
        long j13;
        androidx.lifecycle.f0 f0Var;
        androidx.lifecycle.f0 f0Var2;
        int i21;
        long j14;
        long j15;
        androidx.lifecycle.f0 f0Var3;
        androidx.lifecycle.f0 f0Var4;
        boolean z10;
        boolean z11;
        PackageItemModel packageItemModel;
        synchronized (this) {
            j10 = this.f53459v0;
            this.f53459v0 = 0L;
        }
        jg.n3 n3Var = this.f53446k0;
        if ((1023 & j10) != 0) {
            if ((j10 & 769) != 0) {
                androidx.lifecycle.f0 X = n3Var != null ? n3Var.X() : null;
                S(0, X);
                List list = X != null ? (List) X.f() : null;
                if (list != null) {
                    outletHours9 = (OutletHours) list.get(6);
                    outletHours10 = (OutletHours) list.get(5);
                    outletHours11 = (OutletHours) list.get(1);
                    outletHours12 = (OutletHours) list.get(3);
                    outletHours13 = (OutletHours) list.get(0);
                    outletHours14 = (OutletHours) list.get(4);
                    outletHours8 = (OutletHours) list.get(2);
                    if ((j10 & 800) == 0) {
                        jg.w3 d02 = n3Var != null ? n3Var.d0() : null;
                        long j16 = j10 & 768;
                        if (j16 != 0) {
                            if (d02 != null) {
                                packageItemModel = d02.G0();
                                str17 = d02.P0();
                                z10 = d02.Q1();
                                str18 = d02.O0();
                                str19 = d02.Q0();
                                String R0 = d02.R0();
                                z11 = d02.R1();
                                str16 = R0;
                            } else {
                                z10 = false;
                                z11 = false;
                                str16 = null;
                                packageItemModel = null;
                                str17 = null;
                                str18 = null;
                                str19 = null;
                            }
                            if (j16 != 0) {
                                j10 |= z10 ? 8192L : 4096L;
                            }
                            if ((j10 & 768) != 0) {
                                j10 |= z11 ? 131072L : 65536L;
                            }
                            str9 = packageItemModel != null ? packageItemModel.getItemNumber() : null;
                            i16 = z10 ? 0 : 8;
                            String str28 = this.f53440e0.getResources().getString(yf.h.R2) + str16;
                            i12 = z11 ? 0 : 8;
                            str14 = (str28 + this.f53440e0.getResources().getString(yf.h.O2)) + str9;
                        } else {
                            str14 = null;
                            str16 = null;
                            str9 = null;
                            str17 = null;
                            str18 = null;
                            str19 = null;
                            i12 = 0;
                            i16 = 0;
                        }
                        androidx.lifecycle.f0 m02 = d02 != null ? d02.m0() : null;
                        S(5, m02);
                        str15 = m02 != null ? (String) m02.f() : null;
                        j11 = 774;
                    } else {
                        str14 = null;
                        str15 = null;
                        str16 = null;
                        str9 = null;
                        str17 = null;
                        str18 = null;
                        str19 = null;
                        i12 = 0;
                        j11 = 774;
                        i16 = 0;
                    }
                    if ((j10 & j11) == 0) {
                        if (n3Var != null) {
                            f0Var3 = n3Var.V();
                            f0Var4 = n3Var.Z();
                        } else {
                            f0Var3 = null;
                            f0Var4 = null;
                        }
                        S(1, f0Var3);
                        S(2, f0Var4);
                        str20 = f0Var3 != null ? (String) f0Var3.f() : null;
                        str21 = f0Var4 != null ? (String) f0Var4.f() : null;
                        str22 = str21 + str20;
                    } else {
                        str20 = null;
                        str21 = null;
                        str22 = null;
                    }
                    if ((j10 & 776) != 0) {
                        androidx.lifecycle.f0 a02 = n3Var != null ? n3Var.a0() : null;
                        S(3, a02);
                        if (a02 != null) {
                            str23 = (String) a02.f();
                            j12 = j10 & 784;
                            if (j12 != 0) {
                                if (n3Var != null) {
                                    outletHours15 = outletHours8;
                                    i21 = 4;
                                    str24 = str23;
                                    f0Var2 = n3Var.e0();
                                } else {
                                    str24 = str23;
                                    outletHours15 = outletHours8;
                                    f0Var2 = null;
                                    i21 = 4;
                                }
                                S(i21, f0Var2);
                                boolean M = androidx.databinding.n.M(f0Var2 != null ? (Boolean) f0Var2.f() : null);
                                if (j12 != 0) {
                                    if (M) {
                                        j14 = j10 | 32768;
                                        j15 = 524288;
                                    } else {
                                        j14 = j10 | 16384;
                                        j15 = 262144;
                                    }
                                    j10 = j14 | j15;
                                }
                                i18 = M ? 0 : 8;
                                i17 = M ? 8 : 0;
                            } else {
                                str24 = str23;
                                outletHours15 = outletHours8;
                                i17 = 0;
                                i18 = 0;
                            }
                            if ((j10 & 832) != 0) {
                                if (n3Var != null) {
                                    f0Var = n3Var.c0();
                                    i19 = i17;
                                } else {
                                    i19 = i17;
                                    f0Var = null;
                                }
                                S(6, f0Var);
                                str26 = f0Var != null ? (String) f0Var.f() : null;
                                StringBuilder sb2 = new StringBuilder();
                                i20 = i18;
                                str25 = str14;
                                sb2.append(this.f53444i0.getResources().getString(yf.h.f52639s));
                                sb2.append(str26);
                                str27 = sb2.toString();
                            } else {
                                i19 = i17;
                                i20 = i18;
                                str25 = str14;
                                str26 = null;
                                str27 = null;
                            }
                            j13 = j10 & 896;
                            if (j13 != 0) {
                                androidx.lifecycle.f0 b02 = n3Var != null ? n3Var.b0() : null;
                                S(7, b02);
                                boolean M2 = androidx.databinding.n.M(b02 != null ? (Boolean) b02.f() : null);
                                if (j13 != 0) {
                                    j10 |= M2 ? 2048L : 1024L;
                                }
                                str3 = str16;
                                str10 = str20;
                                str11 = str21;
                                str13 = str22;
                                outletHours7 = outletHours9;
                                i13 = i16;
                                outletHours6 = outletHours10;
                                outletHours2 = outletHours11;
                                outletHours4 = outletHours12;
                                outletHours = outletHours13;
                                outletHours5 = outletHours14;
                                str12 = str24;
                                i10 = M2 ? 0 : 8;
                                str5 = str17;
                                i14 = i19;
                                str2 = str18;
                                outletHours3 = outletHours15;
                                str6 = str25;
                            } else {
                                str3 = str16;
                                str10 = str20;
                                str11 = str21;
                                str13 = str22;
                                outletHours7 = outletHours9;
                                i13 = i16;
                                outletHours6 = outletHours10;
                                outletHours2 = outletHours11;
                                outletHours4 = outletHours12;
                                outletHours = outletHours13;
                                outletHours5 = outletHours14;
                                str12 = str24;
                                str5 = str17;
                                i14 = i19;
                                str2 = str18;
                                outletHours3 = outletHours15;
                                str6 = str25;
                                i10 = 0;
                            }
                            str7 = str26;
                            str8 = str27;
                            str = str15;
                            str4 = str19;
                            i11 = i20;
                        }
                    }
                    str23 = null;
                    j12 = j10 & 784;
                    if (j12 != 0) {
                    }
                    if ((j10 & 832) != 0) {
                    }
                    j13 = j10 & 896;
                    if (j13 != 0) {
                    }
                    str7 = str26;
                    str8 = str27;
                    str = str15;
                    str4 = str19;
                    i11 = i20;
                }
            }
            outletHours8 = null;
            outletHours9 = null;
            outletHours10 = null;
            outletHours11 = null;
            outletHours12 = null;
            outletHours13 = null;
            outletHours14 = null;
            if ((j10 & 800) == 0) {
            }
            if ((j10 & j11) == 0) {
            }
            if ((j10 & 776) != 0) {
            }
            str23 = null;
            j12 = j10 & 784;
            if (j12 != 0) {
            }
            if ((j10 & 832) != 0) {
            }
            j13 = j10 & 896;
            if (j13 != 0) {
            }
            str7 = str26;
            str8 = str27;
            str = str15;
            str4 = str19;
            i11 = i20;
        } else {
            str = null;
            str2 = null;
            str3 = null;
            str4 = null;
            str5 = null;
            str6 = null;
            str7 = null;
            str8 = null;
            str9 = null;
            str10 = null;
            str11 = null;
            str12 = null;
            outletHours = null;
            outletHours2 = null;
            outletHours3 = null;
            outletHours4 = null;
            outletHours5 = null;
            outletHours6 = null;
            outletHours7 = null;
            str13 = null;
            i10 = 0;
            i11 = 0;
            i12 = 0;
            i13 = 0;
            i14 = 0;
        }
        if ((j10 & 768) != 0) {
            i15 = i11;
            this.A.setVisibility(i13);
            b4.e.e(this.C, str2);
            b4.e.e(this.F, str3);
            b4.e.e(this.M, str9);
            this.f53437b0.setVisibility(i12);
            b4.e.e(this.f53439d0, str4);
            if (androidx.databinding.n.u() >= 4) {
                this.E.setContentDescription(str5);
                this.f53439d0.setContentDescription(str4);
                this.f53440e0.setContentDescription(str6);
            }
        } else {
            i15 = i11;
        }
        if ((j10 & 832) != 0) {
            b4.e.e(this.D, str7);
            if (androidx.databinding.n.u() >= 4) {
                this.f53444i0.setContentDescription(str8);
            }
        }
        if ((800 & j10) != 0) {
            b4.e.e(this.E, str);
        }
        if ((512 & j10) != 0) {
            this.R.setOnClickListener(this.f53457t0);
            this.f53436a0.setOnClickListener(this.f53458u0);
            if (androidx.databinding.n.u() >= 4) {
                TextView textView = this.S;
                Resources resources = textView.getResources();
                int i22 = yf.h.I0;
                textView.setContentDescription(resources.getString(i22, this.S.getResources().getString(yf.h.P2)));
                TextView textView2 = this.U;
                textView2.setContentDescription(textView2.getResources().getString(i22, this.U.getResources().getString(yf.h.K0)));
                TextView textView3 = this.Z;
                textView3.setContentDescription(textView3.getResources().getString(i22, this.Z.getResources().getString(yf.h.Q2)));
            }
        }
        if ((896 & j10) != 0) {
            this.R.setVisibility(i10);
        }
        if ((784 & j10) != 0) {
            int i23 = i15;
            this.S.setVisibility(i23);
            this.T.setVisibility(i23);
            this.V.setVisibility(i23);
            this.W.setVisibility(i23);
            this.X.setVisibility(i14);
            this.f53436a0.setVisibility(i23);
            this.f53444i0.setVisibility(i23);
        }
        if ((770 & j10) != 0) {
            b4.e.e(this.V, str10);
        }
        if ((772 & j10) != 0) {
            b4.e.e(this.W, str11);
        }
        if ((776 & j10) != 0) {
            b4.e.e(this.Y, str12);
        }
        if ((j10 & 769) != 0) {
            this.f53450m0.U(outletHours);
            this.f53451n0.U(outletHours2);
            this.f53452o0.U(outletHours3);
            this.f53453p0.U(outletHours4);
            this.f53454q0.U(outletHours5);
            this.f53455r0.U(outletHours6);
            this.f53456s0.U(outletHours7);
        }
        if ((j10 & 774) != 0 && androidx.databinding.n.u() >= 4) {
            this.f53443h0.setContentDescription(str13);
        }
        androidx.databinding.n.p(this.f53450m0);
        androidx.databinding.n.p(this.f53451n0);
        androidx.databinding.n.p(this.f53452o0);
        androidx.databinding.n.p(this.f53453p0);
        androidx.databinding.n.p(this.f53454q0);
        androidx.databinding.n.p(this.f53455r0);
        androidx.databinding.n.p(this.f53456s0);
    }

    @Override // androidx.databinding.n
    public boolean z() {
        synchronized (this) {
            if (this.f53459v0 != 0) {
                return true;
            }
            return this.f53450m0.z() || this.f53451n0.z() || this.f53452o0.z() || this.f53453p0.z() || this.f53454q0.z() || this.f53455r0.z() || this.f53456s0.z();
        }
    }

    private x2(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 8, (LinearLayout) objArr[7], (TextView) objArr[41], (TextView) objArr[8], (TextView) objArr[20], (TextView) objArr[1], (TextView) objArr[5], (TextView) objArr[38], (NestedScrollView) objArr[31], (ImageView) objArr[36], (FrameLayout) objArr[35], (Space) objArr[34], (TextView) objArr[33], (TextView) objArr[6], (TextView) objArr[40], (TextView) objArr[32], (LinearLayout) objArr[22], (TextView) objArr[43], (ImageView) objArr[2], (TextView) objArr[18], (LinearLayout) objArr[21], (TextView) objArr[3], (TextView) objArr[16], (TextView) objArr[15], (TextView) objArr[13], (TextView) objArr[12], (TextView) objArr[11], (Button) objArr[17], (LinearLayout) objArr[9], (TextView) objArr[42], (TextView) objArr[10], (LinearLayout) objArr[4], (View) objArr[23], (LinearLayout) objArr[37], (LinearLayout) objArr[14], (LinearLayout) objArr[19], (LinearLayout) objArr[39]);
        this.f53459v0 = -1L;
        this.A.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        this.E.setTag(null);
        this.F.setTag(null);
        this.M.setTag(null);
        this.P.setTag(null);
        this.R.setTag(null);
        this.S.setTag(null);
        this.T.setTag(null);
        this.U.setTag(null);
        this.V.setTag(null);
        this.W.setTag(null);
        this.X.setTag(null);
        this.Y.setTag(null);
        this.Z.setTag(null);
        this.f53436a0.setTag(null);
        this.f53437b0.setTag(null);
        this.f53439d0.setTag(null);
        this.f53440e0.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.f53449l0 = relativeLayout;
        relativeLayout.setTag(null);
        w3 w3Var = (w3) objArr[24];
        this.f53450m0 = w3Var;
        N(w3Var);
        w3 w3Var2 = (w3) objArr[25];
        this.f53451n0 = w3Var2;
        N(w3Var2);
        w3 w3Var3 = (w3) objArr[26];
        this.f53452o0 = w3Var3;
        N(w3Var3);
        w3 w3Var4 = (w3) objArr[27];
        this.f53453p0 = w3Var4;
        N(w3Var4);
        w3 w3Var5 = (w3) objArr[28];
        this.f53454q0 = w3Var5;
        N(w3Var5);
        w3 w3Var6 = (w3) objArr[29];
        this.f53455r0 = w3Var6;
        N(w3Var6);
        w3 w3Var7 = (w3) objArr[30];
        this.f53456s0 = w3Var7;
        N(w3Var7);
        this.f53443h0.setTag(null);
        this.f53444i0.setTag(null);
        P(view);
        this.f53457t0 = new cg.a(this, 1);
        this.f53458u0 = new cg.a(this, 2);
        B();
    }
}
