package zf;

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

/* loaded from: classes4.dex */
public class j3 extends i3 implements a.InterfaceC0282a {
    private static final n.i M = null;
    private static final SparseIntArray N;
    private final CpcFragmentContainerView H;
    private final View.OnClickListener I;
    private final View.OnClickListener J;
    private final View.OnClickListener K;
    private long L;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(yf.d.f52492y1, 4);
        sparseIntArray.put(yf.d.f52486w1, 5);
        sparseIntArray.put(yf.d.f52483v1, 6);
    }

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

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

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 != 0) {
            return false;
        }
        return U((androidx.lifecycle.a0) obj, i11);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d != i10) {
            return false;
        }
        V((jg.d4) obj);
        return true;
    }

    public void V(jg.d4 d4Var) {
        this.G = d4Var;
        synchronized (this) {
            this.L |= 2;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            jg.d4 d4Var = this.G;
            if (d4Var != null) {
                d4Var.i0();
                return;
            }
            return;
        }
        if (i10 == 2) {
            jg.d4 d4Var2 = this.G;
            if (d4Var2 != null) {
                d4Var2.j0();
                return;
            }
            return;
        }
        if (i10 != 3) {
            return;
        }
        jg.d4 d4Var3 = this.G;
        if (d4Var3 != null) {
            d4Var3.h0();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        jg.d4 d4Var = this.G;
        long j11 = 7 & j10;
        Boolean bool = null;
        if (j11 != 0) {
            androidx.lifecycle.a0 c02 = d4Var != null ? d4Var.c0() : null;
            S(0, c02);
            if (c02 != null) {
                bool = (Boolean) c02.f();
            }
        }
        if ((j10 & 4) != 0) {
            this.A.setOnClickListener(this.I);
            this.B.setOnClickListener(this.K);
            this.E.setOnClickListener(this.J);
        }
        if (j11 != 0) {
            u7.g.k(this.H, bool);
        }
    }

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

    private j3(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 1, (Button) objArr[3], (Button) objArr[2], (TextView) objArr[6], (TextView) objArr[5], (TextView) objArr[1], (TextView) objArr[4]);
        this.L = -1L;
        this.A.setTag(null);
        this.B.setTag(null);
        CpcFragmentContainerView cpcFragmentContainerView = (CpcFragmentContainerView) objArr[0];
        this.H = cpcFragmentContainerView;
        cpcFragmentContainerView.setTag(null);
        this.E.setTag(null);
        P(view);
        this.I = new cg.a(this, 3);
        this.J = new cg.a(this, 1);
        this.K = new cg.a(this, 2);
        B();
    }
}
