package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.ui.CpcFormatView;
import ca.canadapost.core.common.ui.CpcFragmentContainerFullView;
import cg.a;
import jg.o6;

/* loaded from: classes4.dex */
public class j4 extends i4 implements a.InterfaceC0282a {
    private static final n.i I = null;
    private static final SparseIntArray J;
    private final CpcFormatView E;
    private final View.OnClickListener F;
    private final View.OnClickListener G;
    private long H;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        J = sparseIntArray;
        sparseIntArray.put(yf.d.f52493z, 2);
        sparseIntArray.put(yf.d.f52490y, 3);
    }

    public j4(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 4, I, J));
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.H = 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 (yf.a.f52373d != i10) {
            return false;
        }
        U((o6) obj);
        return true;
    }

    public void U(o6 o6Var) {
        this.D = o6Var;
        synchronized (this) {
            this.H |= 1;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            o6 o6Var = this.D;
            if (o6Var != null) {
                o6Var.T();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        o6 o6Var2 = this.D;
        if (o6Var2 != null) {
            o6Var2.S();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.H;
            this.H = 0L;
        }
        if ((j10 & 2) != 0) {
            u8.m.a(this.E, this.G);
            u8.m.b(this.E, this.F);
        }
    }

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

    private j4(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (TextView) objArr[3], (TextView) objArr[2], (CpcFragmentContainerFullView) objArr[0]);
        this.H = -1L;
        this.C.setTag(null);
        CpcFormatView cpcFormatView = (CpcFormatView) objArr[1];
        this.E = cpcFormatView;
        cpcFormatView.setTag(null);
        P(view);
        this.F = new cg.a(this, 2);
        this.G = new cg.a(this, 1);
        B();
    }
}
