package od;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.Space;
import androidx.appcompat.widget.SwitchCompat;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.databinding.n;
import ca.canadapost.core.common.customView.CpcTextInput;
import ud.a;

/* loaded from: classes4.dex */
public class b1 extends a1 implements a.InterfaceC0889a {
    private static final n.i U;
    private static final SparseIntArray V;
    private final CoordinatorLayout G;
    private final ConstraintLayout H;
    private final Button I;
    private final Space J;
    private final Button K;
    private final Button L;
    private final Button M;
    private final View.OnClickListener N;
    private final View.OnClickListener O;
    private final View.OnClickListener P;
    private final View.OnClickListener Q;
    private androidx.databinding.g R;
    private androidx.databinding.g S;
    private long T;

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b1.this.D);
            ca.canadapost.module.login.signin.a aVar = b1.this.F;
            if (aVar != null) {
                androidx.lifecycle.f0 x02 = aVar.x0();
                if (x02 != null) {
                    x02.q(a10);
                }
            }
        }
    }

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(b1.this.E);
            ca.canadapost.module.login.signin.a aVar = b1.this.F;
            if (aVar != null) {
                androidx.lifecycle.f0 E0 = aVar.E0();
                if (E0 != null) {
                    E0.q(a10);
                }
            }
        }
    }

    static {
        n.i iVar = new n.i(12);
        U = iVar;
        iVar.a(0, new String[]{"login_fragment_bottom_sheet"}, new int[]{10}, new int[]{ld.k.B});
        SparseIntArray sparseIntArray = new SparseIntArray();
        V = sparseIntArray;
        sparseIntArray.put(ld.j.S, 11);
    }

    public b1(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 12, U, V));
    }

    private boolean U(c1 c1Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 1;
        }
        return true;
    }

    private boolean V(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 16;
        }
        return true;
    }

    private boolean W(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 4;
        }
        return true;
    }

    private boolean X(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 64;
        }
        return true;
    }

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

    private boolean Z(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 2;
        }
        return true;
    }

    private boolean a0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ld.a.f27861a) {
            return false;
        }
        synchronized (this) {
            this.T |= 32;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    public void O(androidx.lifecycle.u uVar) {
        super.O(uVar);
        this.B.O(uVar);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (ld.a.f27862b != i10) {
            return false;
        }
        b0((ca.canadapost.module.login.signin.a) obj);
        return true;
    }

    @Override // ud.a.InterfaceC0889a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            ca.canadapost.module.login.signin.a aVar = this.F;
            if (aVar != null) {
                aVar.P0();
                return;
            }
            return;
        }
        if (i10 == 2) {
            ca.canadapost.module.login.signin.a aVar2 = this.F;
            if (aVar2 != null) {
                aVar2.e0(true);
                return;
            }
            return;
        }
        if (i10 == 3) {
            ca.canadapost.module.login.signin.a aVar3 = this.F;
            if (aVar3 != null) {
                aVar3.i0();
                return;
            }
            return;
        }
        if (i10 != 4) {
            return;
        }
        ca.canadapost.module.login.signin.a aVar4 = this.F;
        if (aVar4 != null) {
            aVar4.T0();
        }
    }

    public void b0(ca.canadapost.module.login.signin.a aVar) {
        this.F = aVar;
        synchronized (this) {
            this.T |= 128;
        }
        f(ld.a.f27862b);
        super.J();
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x0074  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x0098  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x00b6  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x00d6  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x00ae  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        boolean z10;
        Boolean bool;
        String str;
        String str2;
        androidx.lifecycle.f0 f0Var;
        androidx.lifecycle.f0 f0Var2;
        androidx.lifecycle.f0 f0Var3;
        String str3;
        synchronized (this) {
            j10 = this.T;
            this.T = 0L;
        }
        ca.canadapost.module.login.signin.a aVar = this.F;
        boolean z11 = false;
        Boolean bool2 = null;
        if ((510 & j10) != 0) {
            if ((j10 & 386) != 0) {
                f0Var3 = aVar != null ? aVar.E0() : null;
                S(1, f0Var3);
                if (f0Var3 != null) {
                }
            } else {
                f0Var3 = null;
            }
            if ((j10 & 388) != 0) {
                androidx.lifecycle.a0 y02 = aVar != null ? aVar.y0() : null;
                S(2, y02);
                if (y02 != null) {
                    str2 = (String) y02.f();
                    boolean j02 = ((j10 & 384) != 0 || aVar == null) ? false : aVar.j0();
                    if ((j10 & 392) != 0) {
                        androidx.lifecycle.a0 D0 = aVar != null ? aVar.D0() : null;
                        S(3, D0);
                        z11 = androidx.databinding.n.M(D0 != null ? (Boolean) D0.f() : null);
                    }
                    if ((j10 & 400) == 0) {
                        f0Var2 = aVar != null ? aVar.x0() : null;
                        S(4, f0Var2);
                        if (f0Var2 != null) {
                        }
                    } else {
                        f0Var2 = null;
                    }
                    if ((j10 & 416) != 0) {
                        androidx.lifecycle.a0 F0 = aVar != null ? aVar.F0() : null;
                        S(5, F0);
                        if (F0 != null) {
                            str3 = (String) F0.f();
                            if ((j10 & 448) != 0) {
                                androidx.lifecycle.a0 A0 = aVar != null ? aVar.A0() : null;
                                S(6, A0);
                                if (A0 != null) {
                                    bool2 = (Boolean) A0.f();
                                }
                            }
                            str = str3;
                            bool = bool2;
                            boolean z12 = j02;
                            f0Var = f0Var3;
                            z10 = z11;
                            z11 = z12;
                        }
                    }
                    str3 = null;
                    if ((j10 & 448) != 0) {
                    }
                    str = str3;
                    bool = bool2;
                    boolean z122 = j02;
                    f0Var = f0Var3;
                    z10 = z11;
                    z11 = z122;
                }
            }
            str2 = null;
            if ((j10 & 384) != 0) {
            }
            if ((j10 & 392) != 0) {
            }
            if ((j10 & 400) == 0) {
            }
            if ((j10 & 416) != 0) {
            }
            str3 = null;
            if ((j10 & 448) != 0) {
            }
            str = str3;
            bool = bool2;
            boolean z1222 = j02;
            f0Var = f0Var3;
            z10 = z11;
            z11 = z1222;
        } else {
            z10 = false;
            bool = null;
            str = null;
            str2 = null;
            f0Var = null;
            f0Var2 = null;
        }
        if ((j10 & 392) != 0) {
            b4.a.a(this.A, z10);
        }
        if ((j10 & 384) != 0) {
            this.B.U(aVar);
            u7.g.k(this.H, Boolean.valueOf(z11));
        }
        if ((256 & j10) != 0) {
            this.I.setOnClickListener(this.Q);
            this.K.setOnClickListener(this.N);
            this.L.setOnClickListener(this.P);
            this.M.setOnClickListener(this.O);
            ca.canadapost.core.common.customView.u.e(this.D, this.R);
            ca.canadapost.core.common.customView.u.e(this.E, this.S);
        }
        if ((448 & j10) != 0) {
            u7.g.k(this.J, bool);
            u7.g.k(this.K, bool);
        }
        if ((388 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.D, str2);
        }
        if ((j10 & 400) != 0) {
            ca.canadapost.core.common.customView.u.b(this.D, f0Var2);
        }
        if ((416 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.E, str);
        }
        if ((j10 & 386) != 0) {
            ca.canadapost.core.common.customView.u.b(this.E, f0Var);
        }
        androidx.databinding.n.p(this.B);
    }

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

    private b1(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 7, (SwitchCompat) objArr[4], (c1) objArr[10], (View) objArr[11], (CpcTextInput) objArr[2], (CpcTextInput) objArr[1]);
        this.R = new a();
        this.S = new b();
        this.T = -1L;
        this.A.setTag(null);
        N(this.B);
        CoordinatorLayout coordinatorLayout = (CoordinatorLayout) objArr[0];
        this.G = coordinatorLayout;
        coordinatorLayout.setTag(null);
        ConstraintLayout constraintLayout = (ConstraintLayout) objArr[3];
        this.H = constraintLayout;
        constraintLayout.setTag(null);
        Button button = (Button) objArr[5];
        this.I = button;
        button.setTag(null);
        Space space = (Space) objArr[6];
        this.J = space;
        space.setTag(null);
        Button button2 = (Button) objArr[7];
        this.K = button2;
        button2.setTag(null);
        Button button3 = (Button) objArr[8];
        this.L = button3;
        button3.setTag(null);
        Button button4 = (Button) objArr[9];
        this.M = button4;
        button4.setTag(null);
        this.D.setTag(null);
        this.E.setTag(null);
        P(view);
        this.N = new ud.a(this, 2);
        this.O = new ud.a(this, 4);
        this.P = new ud.a(this, 3);
        this.Q = new ud.a(this, 1);
        B();
    }
}
