package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import cg.a;

/* loaded from: classes4.dex */
public class v2 extends u2 implements a.InterfaceC0282a {
    private static final n.i S = null;
    private static final SparseIntArray T;
    private final TextView N;
    private final LinearLayout O;
    private final TextView P;
    private final View.OnClickListener Q;
    private long R;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        T = sparseIntArray;
        sparseIntArray.put(yf.d.S, 11);
        sparseIntArray.put(yf.d.f52465p1, 12);
    }

    public v2(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 13, S, T));
    }

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

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

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

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

    private boolean a0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.R |= 128;
        }
        return true;
    }

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

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

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

    private boolean e0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.R |= 256;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.R = 2048L;
        }
        J();
    }

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d == i10) {
            U((jg.w3) obj);
        } else if (yf.a.f52376g == i10) {
            f0((androidx.lifecycle.f0) obj);
        } else {
            if (yf.a.f52378i != i10) {
                return false;
            }
            V((ca.canadapost.module.track.views.f) obj);
        }
        return true;
    }

    @Override // zf.u2
    public void U(jg.w3 w3Var) {
        this.K = w3Var;
        synchronized (this) {
            this.R |= 512;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // zf.u2
    public void V(ca.canadapost.module.track.views.f fVar) {
        this.L = fVar;
        synchronized (this) {
            this.R |= 1024;
        }
        f(yf.a.f52378i);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        ca.canadapost.module.track.views.f fVar = this.L;
        if (fVar != null) {
            fVar.N0();
        }
    }

    public void f0(androidx.lifecycle.f0 f0Var) {
        this.M = f0Var;
    }

    /* JADX WARN: Removed duplicated region for block: B:146:0x029a  */
    /* JADX WARN: Removed duplicated region for block: B:149:0x02a5  */
    /* JADX WARN: Removed duplicated region for block: B:152:0x02b5  */
    /* JADX WARN: Removed duplicated region for block: B:155:0x02c0  */
    /* JADX WARN: Removed duplicated region for block: B:158:0x02d0  */
    /* JADX WARN: Removed duplicated region for block: B:161:0x02e0  */
    /* JADX WARN: Removed duplicated region for block: B:164:0x02eb  */
    /* JADX WARN: Removed duplicated region for block: B:167:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:17:0x0053  */
    /* JADX WARN: Removed duplicated region for block: B:180:0x0190  */
    /* JADX WARN: Removed duplicated region for block: B:188:0x012b  */
    /* JADX WARN: Removed duplicated region for block: B:196:0x00a1  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0072  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00af  */
    /* JADX WARN: Removed duplicated region for block: B:46:0x00cf A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:50:0x00dd  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x0138  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x015a  */
    @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;
        androidx.lifecycle.f0 f0Var;
        String str5;
        String str6;
        int i10;
        int i11;
        boolean z10;
        boolean z11;
        int i12;
        boolean z12;
        androidx.lifecycle.f0 f0Var2;
        long j11;
        int i13;
        String str7;
        androidx.lifecycle.a0 a0Var;
        long j12;
        int i14;
        long j13;
        int i15;
        long j14;
        synchronized (this) {
            j10 = this.R;
            this.R = 0L;
        }
        jg.w3 w3Var = this.K;
        ca.canadapost.module.track.views.f fVar = this.L;
        Boolean bool = null;
        if ((2783 & j10) != 0) {
            if ((j10 & 2561) != 0) {
                androidx.lifecycle.f0 e02 = w3Var != null ? w3Var.e0() : null;
                S(0, e02);
                if (e02 != null) {
                    str = (String) e02.f();
                    if ((j10 & 2562) != 0) {
                        androidx.lifecycle.f0 d02 = w3Var != null ? w3Var.d0() : null;
                        S(1, d02);
                        if (d02 != null) {
                            str5 = (String) d02.f();
                            j12 = j10 & 2564;
                            if (j12 != 0) {
                                f0Var = w3Var != null ? w3Var.u0() : null;
                                S(2, f0Var);
                                str6 = f0Var != null ? (String) f0Var.f() : null;
                                z12 = str6 != null;
                                if (j12 != 0) {
                                    j10 = z12 ? j10 | 8192 : j10 | 4096;
                                }
                                i14 = z12 ? 0 : 8;
                            } else {
                                f0Var = null;
                                str6 = null;
                                i14 = 0;
                                z12 = false;
                            }
                            if ((j10 & 2568) != 0) {
                                androidx.lifecycle.f0 I0 = w3Var != null ? w3Var.I0() : null;
                                S(3, I0);
                                if (I0 != null) {
                                    str3 = (String) I0.f();
                                    z11 = ((j10 & 2560) != 0 || w3Var == null) ? false : w3Var.O1();
                                    if ((j10 & 2580) == 0) {
                                        androidx.lifecycle.f0 t02 = w3Var != null ? w3Var.t0() : null;
                                        S(4, t02);
                                        str2 = t02 != null ? (String) t02.f() : null;
                                        z10 = str2 != null;
                                        if ((j10 & 2576) != 0) {
                                            j10 |= z10 ? 32768L : 16384L;
                                        }
                                        if ((j10 & 2580) != 0) {
                                            j10 = z10 ? j10 | 2097152 : j10 | 1048576;
                                        }
                                        if ((j10 & 2576) != 0) {
                                            i15 = z10 ? 0 : 8;
                                            j13 = 2624;
                                            if ((j10 & j13) != 0) {
                                                androidx.lifecycle.f0 K0 = w3Var != null ? w3Var.K0() : null;
                                                S(6, K0);
                                                if (K0 != null) {
                                                    str4 = (String) K0.f();
                                                    j14 = j10 & 2688;
                                                    if (j14 == 0) {
                                                        androidx.lifecycle.a0 p12 = w3Var != null ? w3Var.p1() : null;
                                                        S(7, p12);
                                                        boolean M = androidx.databinding.n.M(p12 != null ? (Boolean) p12.f() : null);
                                                        if (j14 != 0) {
                                                            j10 |= M ? 131072L : 65536L;
                                                        }
                                                        i10 = M ? 0 : 8;
                                                        i11 = i14;
                                                        i12 = i15;
                                                    } else {
                                                        i11 = i14;
                                                        i12 = i15;
                                                        i10 = 0;
                                                    }
                                                }
                                            }
                                            str4 = null;
                                            j14 = j10 & 2688;
                                            if (j14 == 0) {
                                            }
                                        }
                                    } else {
                                        str2 = null;
                                        z10 = false;
                                    }
                                    j13 = 2624;
                                    i15 = 0;
                                    if ((j10 & j13) != 0) {
                                    }
                                    str4 = null;
                                    j14 = j10 & 2688;
                                    if (j14 == 0) {
                                    }
                                }
                            }
                            str3 = null;
                            if ((j10 & 2560) != 0) {
                            }
                            if ((j10 & 2580) == 0) {
                            }
                            j13 = 2624;
                            i15 = 0;
                            if ((j10 & j13) != 0) {
                            }
                            str4 = null;
                            j14 = j10 & 2688;
                            if (j14 == 0) {
                            }
                        }
                    }
                    str5 = null;
                    j12 = j10 & 2564;
                    if (j12 != 0) {
                    }
                    if ((j10 & 2568) != 0) {
                    }
                    str3 = null;
                    if ((j10 & 2560) != 0) {
                    }
                    if ((j10 & 2580) == 0) {
                    }
                    j13 = 2624;
                    i15 = 0;
                    if ((j10 & j13) != 0) {
                    }
                    str4 = null;
                    j14 = j10 & 2688;
                    if (j14 == 0) {
                    }
                }
            }
            str = null;
            if ((j10 & 2562) != 0) {
            }
            str5 = null;
            j12 = j10 & 2564;
            if (j12 != 0) {
            }
            if ((j10 & 2568) != 0) {
            }
            str3 = null;
            if ((j10 & 2560) != 0) {
            }
            if ((j10 & 2580) == 0) {
            }
            j13 = 2624;
            i15 = 0;
            if ((j10 & j13) != 0) {
            }
            str4 = null;
            j14 = j10 & 2688;
            if (j14 == 0) {
            }
        } else {
            str = null;
            str2 = null;
            str3 = null;
            str4 = null;
            f0Var = null;
            str5 = null;
            str6 = null;
            i10 = 0;
            i11 = 0;
            z10 = false;
            z11 = false;
            i12 = 0;
            z12 = false;
        }
        if ((j10 & 3328) != 0) {
            if (fVar != null) {
                a0Var = fVar.I0();
                f0Var2 = f0Var;
            } else {
                f0Var2 = f0Var;
                a0Var = null;
            }
            S(8, a0Var);
            if (a0Var != null) {
                bool = (Boolean) a0Var.f();
            }
        } else {
            f0Var2 = f0Var;
        }
        Boolean bool2 = bool;
        if ((j10 & 1048576) != 0) {
            androidx.lifecycle.f0 u02 = w3Var != null ? w3Var.u0() : f0Var2;
            S(2, u02);
            if (u02 != null) {
                str6 = (String) u02.f();
            }
            z12 = str6 != null;
            j11 = 0;
            if ((j10 & 2564) != 0) {
                j10 |= z12 ? 8192L : 4096L;
            }
        } else {
            j11 = 0;
        }
        String str8 = str6;
        long j15 = j10 & 2580;
        if (j15 != j11) {
            boolean z13 = z10 ? true : z12;
            if (j15 != j11) {
                j10 |= z13 ? 524288L : 262144L;
            }
            i13 = z13 ? 0 : 8;
        } else {
            i13 = 0;
        }
        if ((j10 & 2561) != 0) {
            b4.e.e(this.A, str);
        }
        if ((j10 & 2568) != 0) {
            b4.e.e(this.D, str3);
        }
        if ((j10 & 2624) != 0) {
            b4.e.e(this.E, str4);
        }
        if ((2048 & j10) != 0) {
            this.N.setOnClickListener(this.Q);
            if (androidx.databinding.n.u() >= 4) {
                TextView textView = this.N;
                str7 = str5;
                textView.setContentDescription(textView.getResources().getString(yf.h.E, this.N.getResources().getString(yf.h.Q1)));
                if ((j10 & 3328) != 0) {
                    u7.g.k(this.N, bool2);
                }
                if ((j10 & 2560) != 0) {
                    u7.g.k(this.O, Boolean.valueOf(z11));
                }
                if ((2688 & j10) != 0) {
                    this.P.setVisibility(i10);
                }
                if ((j10 & 2576) != 0) {
                    b4.e.e(this.G, str2);
                    this.G.setVisibility(i12);
                }
                if ((j10 & 2564) != 0) {
                    b4.e.e(this.H, str8);
                    this.H.setVisibility(i11);
                }
                if ((j10 & 2580) != 0) {
                    this.I.setVisibility(i13);
                }
                if ((j10 & 2562) == 0) {
                    b4.e.e(this.J, str7);
                    return;
                }
                return;
            }
        }
        str7 = str5;
        if ((j10 & 3328) != 0) {
        }
        if ((j10 & 2560) != 0) {
        }
        if ((2688 & j10) != 0) {
        }
        if ((j10 & 2576) != 0) {
        }
        if ((j10 & 2564) != 0) {
        }
        if ((j10 & 2580) != 0) {
        }
        if ((j10 & 2562) == 0) {
        }
    }

    @Override // androidx.databinding.n
    public boolean z() {
        synchronized (this) {
            return this.R != 0;
        }
    }

    private v2(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 9, (TextView) objArr[4], (TextView) objArr[11], (LinearLayout) objArr[0], (TextView) objArr[1], (TextView) objArr[10], (ImageView) objArr[12], (TextView) objArr[7], (TextView) objArr[8], (ImageView) objArr[6], (TextView) objArr[5]);
        this.R = -1L;
        this.A.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        this.E.setTag(null);
        TextView textView = (TextView) objArr[2];
        this.N = textView;
        textView.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[3];
        this.O = linearLayout;
        linearLayout.setTag(null);
        TextView textView2 = (TextView) objArr[9];
        this.P = textView2;
        textView2.setTag(null);
        this.G.setTag(null);
        this.H.setTag(null);
        this.I.setTag(null);
        this.J.setTag(null);
        P(view);
        this.Q = new cg.a(this, 1);
        B();
    }
}
