package od;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.ui.CpcFragmentContainerView;
import ud.a;

/* loaded from: classes4.dex */
public class f0 extends e0 implements a.InterfaceC0889a {
    private static final n.i M = null;
    private static final SparseIntArray N;
    private final CpcFragmentContainerView F;
    private final TextView G;
    private final Button H;
    private final Button I;
    private final View.OnClickListener J;
    private final View.OnClickListener K;
    private long L;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(ld.j.U, 7);
    }

    public f0(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 8, M, N));
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        return false;
    }

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

    public void U(ca.canadapost.module.login.twostepverification.c cVar) {
        this.E = cVar;
        synchronized (this) {
            this.L |= 1;
        }
        f(ld.a.f27862b);
        super.J();
    }

    @Override // ud.a.InterfaceC0889a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            ca.canadapost.module.login.twostepverification.c cVar = this.E;
            if (cVar != null) {
                cVar.T();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        ca.canadapost.module.login.twostepverification.c cVar2 = this.E;
        if (cVar2 != null) {
            cVar2.U();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        String str;
        boolean z10;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        ca.canadapost.module.login.twostepverification.c cVar = this.E;
        long j11 = j10 & 3;
        if (j11 != 0) {
            r8 = cVar != null ? cVar.R() : false;
            if (j11 != 0) {
                j10 |= r8 ? 8L : 4L;
            }
            boolean z11 = !r8;
            str = this.G.getResources().getString(r8 ? ld.m.E : ld.m.D);
            boolean z12 = r8;
            r8 = z11;
            z10 = z12;
        } else {
            str = null;
            z10 = false;
        }
        if ((3 & j10) != 0) {
            b4.e.e(this.G, str);
            b4.a.a(this.A, r8);
            b4.a.a(this.C, z10);
            u7.g.k(this.C, Boolean.valueOf(z10));
            u7.g.k(this.D, Boolean.valueOf(r8));
        }
        if ((j10 & 2) != 0) {
            this.H.setOnClickListener(this.J);
            this.I.setOnClickListener(this.K);
        }
    }

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

    private f0(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (RadioButton) objArr[3], (RadioGroup) objArr[7], (RadioButton) objArr[2], (RadioButton) objArr[4]);
        this.L = -1L;
        CpcFragmentContainerView cpcFragmentContainerView = (CpcFragmentContainerView) objArr[0];
        this.F = cpcFragmentContainerView;
        cpcFragmentContainerView.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.G = textView;
        textView.setTag(null);
        Button button = (Button) objArr[5];
        this.H = button;
        button.setTag(null);
        Button button2 = (Button) objArr[6];
        this.I = button2;
        button2.setTag(null);
        this.A.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        P(view);
        this.J = new ud.a(this, 1);
        this.K = new ud.a(this, 2);
        B();
    }
}
