package u7;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.databinding.n;
import androidx.recyclerview.widget.RecyclerView;
import ca.canadapost.core.common.customView.CpcDropdownInput;
import ca.canadapost.core.common.customView.CpcTextInput;
import f8.b;

/* loaded from: classes.dex */
public class b extends u7.a implements b.a {

    /* renamed from: b0, reason: collision with root package name */
    private static final n.i f36963b0 = null;

    /* renamed from: c0, reason: collision with root package name */
    private static final SparseIntArray f36964c0;
    private final LinearLayout S;
    private final View.OnClickListener T;
    private final View.OnClickListener U;
    private androidx.databinding.g V;
    private androidx.databinding.g W;
    private androidx.databinding.g X;
    private androidx.databinding.g Y;
    private androidx.databinding.g Z;

    /* renamed from: a0, reason: collision with root package name */
    private long f36965a0;

    /* loaded from: classes.dex */
    class a implements androidx.databinding.g {
        a() {
        }

        @Override // androidx.databinding.g
        public void a() {
            String a10 = b4.e.a(b.this.C);
            s8.l lVar = b.this.R;
            if (lVar != null) {
                androidx.lifecycle.f0 M0 = lVar.M0();
                if (M0 != null) {
                    M0.q(a10);
                }
            }
        }
    }

    /* renamed from: u7.b$b, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    class C0878b implements androidx.databinding.g {
        C0878b() {
        }

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b.this.F);
            s8.l lVar = b.this.R;
            if (lVar != null) {
                androidx.lifecycle.f0 N0 = lVar.N0();
                if (N0 != null) {
                    N0.q(a10);
                }
            }
        }
    }

    /* loaded from: classes.dex */
    class c implements androidx.databinding.g {
        c() {
        }

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b.this.H);
            s8.l lVar = b.this.R;
            if (lVar != null) {
                androidx.lifecycle.f0 P0 = lVar.P0();
                if (P0 != null) {
                    P0.q(a10);
                }
            }
        }
    }

    /* loaded from: classes.dex */
    class d implements androidx.databinding.g {
        d() {
        }

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b.this.J);
            s8.l lVar = b.this.R;
            if (lVar != null) {
                androidx.lifecycle.f0 F0 = lVar.F0();
                if (F0 != null) {
                    F0.q(a10);
                }
            }
        }
    }

    /* loaded from: classes.dex */
    class e implements androidx.databinding.g {
        e() {
        }

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b.this.M);
            s8.l lVar = b.this.R;
            if (lVar != null) {
                androidx.lifecycle.f0 Q0 = lVar.Q0();
                if (Q0 != null) {
                    Q0.q(a10);
                }
            }
        }
    }

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        f36964c0 = sparseIntArray;
        sparseIntArray.put(h7.i.f21038c, 14);
        sparseIntArray.put(h7.i.f21036b, 15);
        sparseIntArray.put(h7.i.E, 16);
        sparseIntArray.put(h7.i.f21080x, 17);
    }

    public b(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 18, f36963b0, f36964c0));
    }

    private boolean V(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 128;
        }
        return true;
    }

    private boolean W(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 64;
        }
        return true;
    }

    private boolean X(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 32;
        }
        return true;
    }

    private boolean Y(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 8;
        }
        return true;
    }

    private boolean Z(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 16;
        }
        return true;
    }

    private boolean a0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 512;
        }
        return true;
    }

    private boolean b0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 1;
        }
        return true;
    }

    private boolean c0(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 1024;
        }
        return true;
    }

    private boolean d0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 4;
        }
        return true;
    }

    private boolean e0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 2;
        }
        return true;
    }

    private boolean f0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.f36965a0 |= 256;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (h7.a.f20948e != i10) {
            return false;
        }
        U((s8.l) obj);
        return true;
    }

    @Override // u7.a
    public void U(s8.l lVar) {
        this.R = lVar;
        synchronized (this) {
            this.f36965a0 |= 2048;
        }
        f(h7.a.f20948e);
        super.J();
    }

    @Override // f8.b.a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            s8.l lVar = this.R;
            if (lVar != null) {
                lVar.l1();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        s8.l lVar2 = this.R;
        if (lVar2 != null) {
            lVar2.m1();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:140:0x01a4  */
    /* JADX WARN: Removed duplicated region for block: B:142:0x0182  */
    /* JADX WARN: Removed duplicated region for block: B:146:0x0140  */
    /* JADX WARN: Removed duplicated region for block: B:152:0x011f  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0065  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x0083  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x009f  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x00bb  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x00d7  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x012b  */
    /* JADX WARN: Removed duplicated region for block: B:78:0x014b  */
    /* JADX WARN: Removed duplicated region for block: B:85:0x016c  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x018d  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        androidx.lifecycle.f0 f0Var;
        String str;
        int i10;
        androidx.lifecycle.f0 f0Var2;
        int i11;
        Boolean bool;
        Boolean bool2;
        Boolean bool3;
        androidx.lifecycle.f0 f0Var3;
        String str2;
        androidx.lifecycle.f0 f0Var4;
        String str3;
        String str4;
        Boolean bool4;
        Boolean bool5;
        Boolean bool6;
        String str5;
        String str6;
        String str7;
        long j11;
        int i12;
        androidx.lifecycle.f0 f0Var5;
        Boolean bool7;
        androidx.lifecycle.f0 f0Var6;
        int i13;
        androidx.lifecycle.a0 a0Var;
        long j12;
        long j13;
        synchronized (this) {
            j10 = this.f36965a0;
            this.f36965a0 = 0L;
        }
        s8.l lVar = this.R;
        if ((8191 & j10) != 0) {
            if ((j10 & 6145) != 0) {
                f0Var2 = lVar != null ? lVar.P0() : null;
                S(0, f0Var2);
                if (f0Var2 != null) {
                }
            } else {
                f0Var2 = null;
            }
            if ((j10 & 6146) != 0) {
                androidx.lifecycle.a0 c12 = lVar != null ? lVar.c1() : null;
                S(1, c12);
                if (c12 != null) {
                    bool5 = (Boolean) c12.f();
                    if ((j10 & 6148) != 0) {
                        androidx.lifecycle.a0 b12 = lVar != null ? lVar.b1() : null;
                        S(2, b12);
                        if (b12 != null) {
                            bool6 = (Boolean) b12.f();
                            if ((j10 & 6152) != 0) {
                                androidx.lifecycle.a0 K0 = lVar != null ? lVar.K0() : null;
                                S(3, K0);
                                if (K0 != null) {
                                    str5 = (String) K0.f();
                                    if ((j10 & 6160) != 0) {
                                        androidx.lifecycle.a0 M0 = lVar != null ? lVar.M0() : null;
                                        S(4, M0);
                                        if (M0 != null) {
                                            str6 = (String) M0.f();
                                            if ((j10 & 6176) != 0) {
                                                androidx.lifecycle.a0 J0 = lVar != null ? lVar.J0() : null;
                                                S(5, J0);
                                                if (J0 != null) {
                                                    str7 = (String) J0.f();
                                                    j11 = j10 & 6208;
                                                    if (j11 == 0) {
                                                        androidx.lifecycle.a0 I0 = lVar != null ? lVar.I0() : null;
                                                        S(6, I0);
                                                        str = I0 != null ? (String) I0.f() : null;
                                                        boolean z10 = str != null;
                                                        if (j11 != 0) {
                                                            if (z10) {
                                                                j12 = j10 | 16384;
                                                                j13 = 65536;
                                                            } else {
                                                                j12 = j10 | 8192;
                                                                j13 = 32768;
                                                            }
                                                            j10 = j12 | j13;
                                                        }
                                                        int i14 = z10 ? 8 : 0;
                                                        i12 = i14;
                                                        i10 = z10 ? 0 : 8;
                                                    } else {
                                                        str = null;
                                                        i10 = 0;
                                                        i12 = 0;
                                                    }
                                                    if ((j10 & 6272) == 0) {
                                                        f0Var5 = lVar != null ? lVar.F0() : null;
                                                        S(7, f0Var5);
                                                        if (f0Var5 != null) {
                                                        }
                                                    } else {
                                                        f0Var5 = null;
                                                    }
                                                    if ((j10 & 6400) != 0) {
                                                        if (lVar != null) {
                                                            a0Var = lVar.d1();
                                                            i13 = 8;
                                                        } else {
                                                            i13 = 8;
                                                            a0Var = null;
                                                        }
                                                        S(i13, a0Var);
                                                        if (a0Var != null) {
                                                            bool7 = (Boolean) a0Var.f();
                                                            if ((j10 & 6656) != 0) {
                                                                f0Var6 = lVar != null ? lVar.N0() : null;
                                                                S(9, f0Var6);
                                                                if (f0Var6 != null) {
                                                                }
                                                            } else {
                                                                f0Var6 = null;
                                                            }
                                                            if ((j10 & 7168) != 0) {
                                                                f0Var = lVar != null ? lVar.Q0() : null;
                                                                S(10, f0Var);
                                                                if (f0Var != null) {
                                                                }
                                                                str4 = str6;
                                                            } else {
                                                                str4 = str6;
                                                                f0Var = null;
                                                            }
                                                            str3 = str5;
                                                            f0Var4 = f0Var5;
                                                            str2 = str7;
                                                            f0Var3 = f0Var6;
                                                            bool3 = bool7;
                                                            bool2 = bool5;
                                                            bool = bool6;
                                                            i11 = i12;
                                                        }
                                                    }
                                                    bool7 = null;
                                                    if ((j10 & 6656) != 0) {
                                                    }
                                                    if ((j10 & 7168) != 0) {
                                                    }
                                                    str3 = str5;
                                                    f0Var4 = f0Var5;
                                                    str2 = str7;
                                                    f0Var3 = f0Var6;
                                                    bool3 = bool7;
                                                    bool2 = bool5;
                                                    bool = bool6;
                                                    i11 = i12;
                                                }
                                            }
                                            str7 = null;
                                            j11 = j10 & 6208;
                                            if (j11 == 0) {
                                            }
                                            if ((j10 & 6272) == 0) {
                                            }
                                            if ((j10 & 6400) != 0) {
                                            }
                                            bool7 = null;
                                            if ((j10 & 6656) != 0) {
                                            }
                                            if ((j10 & 7168) != 0) {
                                            }
                                            str3 = str5;
                                            f0Var4 = f0Var5;
                                            str2 = str7;
                                            f0Var3 = f0Var6;
                                            bool3 = bool7;
                                            bool2 = bool5;
                                            bool = bool6;
                                            i11 = i12;
                                        }
                                    }
                                    str6 = null;
                                    if ((j10 & 6176) != 0) {
                                    }
                                    str7 = null;
                                    j11 = j10 & 6208;
                                    if (j11 == 0) {
                                    }
                                    if ((j10 & 6272) == 0) {
                                    }
                                    if ((j10 & 6400) != 0) {
                                    }
                                    bool7 = null;
                                    if ((j10 & 6656) != 0) {
                                    }
                                    if ((j10 & 7168) != 0) {
                                    }
                                    str3 = str5;
                                    f0Var4 = f0Var5;
                                    str2 = str7;
                                    f0Var3 = f0Var6;
                                    bool3 = bool7;
                                    bool2 = bool5;
                                    bool = bool6;
                                    i11 = i12;
                                }
                            }
                            str5 = null;
                            if ((j10 & 6160) != 0) {
                            }
                            str6 = null;
                            if ((j10 & 6176) != 0) {
                            }
                            str7 = null;
                            j11 = j10 & 6208;
                            if (j11 == 0) {
                            }
                            if ((j10 & 6272) == 0) {
                            }
                            if ((j10 & 6400) != 0) {
                            }
                            bool7 = null;
                            if ((j10 & 6656) != 0) {
                            }
                            if ((j10 & 7168) != 0) {
                            }
                            str3 = str5;
                            f0Var4 = f0Var5;
                            str2 = str7;
                            f0Var3 = f0Var6;
                            bool3 = bool7;
                            bool2 = bool5;
                            bool = bool6;
                            i11 = i12;
                        }
                    }
                    bool6 = null;
                    if ((j10 & 6152) != 0) {
                    }
                    str5 = null;
                    if ((j10 & 6160) != 0) {
                    }
                    str6 = null;
                    if ((j10 & 6176) != 0) {
                    }
                    str7 = null;
                    j11 = j10 & 6208;
                    if (j11 == 0) {
                    }
                    if ((j10 & 6272) == 0) {
                    }
                    if ((j10 & 6400) != 0) {
                    }
                    bool7 = null;
                    if ((j10 & 6656) != 0) {
                    }
                    if ((j10 & 7168) != 0) {
                    }
                    str3 = str5;
                    f0Var4 = f0Var5;
                    str2 = str7;
                    f0Var3 = f0Var6;
                    bool3 = bool7;
                    bool2 = bool5;
                    bool = bool6;
                    i11 = i12;
                }
            }
            bool5 = null;
            if ((j10 & 6148) != 0) {
            }
            bool6 = null;
            if ((j10 & 6152) != 0) {
            }
            str5 = null;
            if ((j10 & 6160) != 0) {
            }
            str6 = null;
            if ((j10 & 6176) != 0) {
            }
            str7 = null;
            j11 = j10 & 6208;
            if (j11 == 0) {
            }
            if ((j10 & 6272) == 0) {
            }
            if ((j10 & 6400) != 0) {
            }
            bool7 = null;
            if ((j10 & 6656) != 0) {
            }
            if ((j10 & 7168) != 0) {
            }
            str3 = str5;
            f0Var4 = f0Var5;
            str2 = str7;
            f0Var3 = f0Var6;
            bool3 = bool7;
            bool2 = bool5;
            bool = bool6;
            i11 = i12;
        } else {
            f0Var = null;
            str = null;
            i10 = 0;
            f0Var2 = null;
            i11 = 0;
            bool = null;
            bool2 = null;
            bool3 = null;
            f0Var3 = null;
            str2 = null;
            f0Var4 = null;
            str3 = null;
            str4 = null;
        }
        if ((j10 & 6208) != 0) {
            bool4 = bool2;
            this.B.setVisibility(i11);
            this.D.setVisibility(i10);
            b4.e.e(this.Q, str);
        } else {
            bool4 = bool2;
        }
        if ((j10 & 6160) != 0) {
            b4.e.e(this.C, str4);
        }
        if ((4096 & j10) != 0) {
            b4.e.f(this.C, null, null, null, this.V);
            ca.canadapost.core.common.customView.u.e(this.F, this.W);
            ca.canadapost.core.common.customView.u.e(this.H, this.X);
            this.I.setOnClickListener(this.T);
            ca.canadapost.core.common.customView.u.e(this.J, this.Y);
            ca.canadapost.core.common.customView.u.e(this.M, this.Z);
            this.N.setOnClickListener(this.U);
        }
        if ((j10 & 6656) != 0) {
            ca.canadapost.core.common.customView.u.b(this.F, f0Var3);
        }
        if ((6400 & j10) != 0) {
            g.k(this.G, bool3);
            g.k(this.N, bool3);
        }
        if ((6176 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.H, str2);
        }
        if ((j10 & 6145) != 0) {
            ca.canadapost.core.common.customView.u.b(this.H, f0Var2);
        }
        if ((j10 & 6148) != 0) {
            g.k(this.I, bool);
        }
        if ((6272 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.J, f0Var4);
        }
        if ((6152 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.M, str3);
        }
        if ((7168 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.M, f0Var);
        }
        if ((j10 & 6146) != 0) {
            Boolean bool8 = bool4;
            g.k(this.O, bool8);
            g.k(this.P, bool8);
        }
    }

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

    private b(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 11, (ConstraintLayout) objArr[15], (TextView) objArr[8], (EditText) objArr[2], (ConstraintLayout) objArr[9], (TextView) objArr[14], (CpcTextInput) objArr[11], (View) objArr[6], (CpcTextInput) objArr[12], (ImageButton) objArr[3], (CpcTextInput) objArr[1], (CpcDropdownInput) objArr[17], (ImageView) objArr[16], (CpcTextInput) objArr[13], (Button) objArr[5], (RecyclerView) objArr[7], (View) objArr[4], (TextView) objArr[10]);
        this.V = new a();
        this.W = new C0878b();
        this.X = new c();
        this.Y = new d();
        this.Z = new e();
        this.f36965a0 = -1L;
        this.B.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        this.F.setTag(null);
        this.G.setTag(null);
        this.H.setTag(null);
        this.I.setTag(null);
        this.J.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.S = linearLayout;
        linearLayout.setTag(null);
        this.M.setTag(null);
        this.N.setTag(null);
        this.O.setTag(null);
        this.P.setTag(null);
        this.Q.setTag(null);
        P(view);
        this.T = new f8.b(this, 1);
        this.U = new f8.b(this, 2);
        B();
    }
}
