package xe;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.databinding.n;
import androidx.lifecycle.f0;
import ca.canadapost.core.common.customView.CpcDropdownInput;
import ca.canadapost.core.common.customView.CpcTextInput;
import we.g0;
import ze.a;

/* loaded from: classes4.dex */
public class t extends s implements a.InterfaceC1058a {
    private static final n.i Q;
    private static final SparseIntArray R;
    private final RelativeLayout K;
    private final View.OnClickListener L;
    private final View.OnClickListener M;
    private androidx.databinding.g N;
    private androidx.databinding.g O;
    private long P;

    /* 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(t.this.E);
            g0 g0Var = t.this.J;
            if (g0Var != null) {
                f0 e02 = g0Var.e0();
                if (e02 != null) {
                    e02.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(t.this.F);
            g0 g0Var = t.this.J;
            if (g0Var != null) {
                f0 f02 = g0Var.f0();
                if (f02 != null) {
                    f02.q(a10);
                }
            }
        }
    }

    static {
        n.i iVar = new n.i(10);
        Q = iVar;
        iVar.a(1, new String[]{"registration_done_button"}, new int[]{6}, new int[]{we.e.f49167d});
        SparseIntArray sparseIntArray = new SparseIntArray();
        R = sparseIntArray;
        sparseIntArray.put(we.d.f49157s, 7);
        sparseIntArray.put(we.d.f49158t, 8);
        sparseIntArray.put(we.d.f49141c, 9);
    }

    public t(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 10, Q, R));
    }

    private boolean V(f0 f0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.P |= 2;
        }
        return true;
    }

    private boolean W(f0 f0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.P |= 1;
        }
        return true;
    }

    private boolean X(g gVar, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.P |= 4;
        }
        return true;
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return W((f0) obj, i11);
        }
        if (i10 == 1) {
            return V((f0) obj, i11);
        }
        if (i10 != 2) {
            return false;
        }
        return X((g) obj, i11);
    }

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

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

    @Override // xe.s
    public void U(g0 g0Var) {
        this.J = g0Var;
        synchronized (this) {
            this.P |= 8;
        }
        f(we.a.f49131b);
        super.J();
    }

    @Override // ze.a.InterfaceC1058a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            g0 g0Var = this.J;
            if (g0Var != null) {
                g0Var.q0();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        g0 g0Var2 = this.J;
        if (g0Var2 != null) {
            g0Var2.q0();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        f0 f0Var;
        synchronized (this) {
            j10 = this.P;
            this.P = 0L;
        }
        g0 g0Var = this.J;
        if ((27 & j10) != 0) {
            if ((j10 & 25) != 0) {
                f0Var = g0Var != null ? g0Var.f0() : null;
                S(0, f0Var);
                if (f0Var != null) {
                }
            } else {
                f0Var = null;
            }
            if ((j10 & 26) != 0) {
                r10 = g0Var != null ? g0Var.e0() : null;
                S(1, r10);
                if (r10 != null) {
                }
            }
        } else {
            f0Var = null;
        }
        if ((16 & j10) != 0) {
            this.B.setOnClickListener(this.L);
            ca.canadapost.core.common.customView.u.e(this.E, this.N);
            ca.canadapost.core.common.customView.u.e(this.F, this.O);
            this.I.setOnClickListener(this.M);
        }
        if ((26 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.E, r10);
        }
        if ((j10 & 25) != 0) {
            ca.canadapost.core.common.customView.u.b(this.F, f0Var);
        }
        androidx.databinding.n.p(this.D);
    }

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

    private t(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 3, (CheckBox) objArr[9], (RelativeLayout) objArr[4], (LinearLayout) objArr[1], (g) objArr[6], (CpcTextInput) objArr[2], (CpcTextInput) objArr[3], (CpcDropdownInput) objArr[7], (CpcDropdownInput) objArr[8], (RelativeLayout) objArr[5]);
        this.N = new a();
        this.O = new b();
        this.P = -1L;
        this.B.setTag(null);
        this.C.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.K = relativeLayout;
        relativeLayout.setTag(null);
        N(this.D);
        this.E.setTag(null);
        this.F.setTag(null);
        this.I.setTag(null);
        P(view);
        this.L = new ze.a(this, 1);
        this.M = new ze.a(this, 2);
        B();
    }
}
