package ad;

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

/* loaded from: classes4.dex */
public class l extends k implements a.InterfaceC0279a {
    private static final n.i J = null;
    private static final SparseIntArray K;
    private final Button F;
    private final View.OnClickListener G;
    private final View.OnClickListener H;
    private long I;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        K = sparseIntArray;
        sparseIntArray.put(yc.x.f52215w, 4);
    }

    public l(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 5, J, K));
    }

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

    public void U(yc.e eVar) {
        this.E = eVar;
        synchronized (this) {
            this.I |= 1;
        }
        f(yc.a.f52075b);
        super.J();
    }

    @Override // cd.a.InterfaceC0279a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            yc.e eVar = this.E;
            if (eVar != null) {
                eVar.W();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        yc.e eVar2 = this.E;
        if (eVar2 != null) {
            eVar2.X();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.I;
            this.I = 0L;
        }
        yc.e eVar = this.E;
        long j11 = 3 & j10;
        CharSequence S = (j11 == 0 || eVar == null) ? null : eVar.S();
        if ((j10 & 2) != 0) {
            this.A.setOnClickListener(this.G);
            this.F.setOnClickListener(this.H);
        }
        if (j11 != 0) {
            b4.e.e(this.B, S);
        }
    }

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

    private l(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (Button) objArr[2], (TextView) objArr[1], (CpcDialogFragmentFullView) objArr[0], (ImageView) objArr[4]);
        this.I = -1L;
        this.A.setTag(null);
        this.B.setTag(null);
        this.C.setTag(null);
        Button button = (Button) objArr[3];
        this.F = button;
        button.setTag(null);
        P(view);
        this.G = new cd.a(this, 1);
        this.H = new cd.a(this, 2);
        B();
    }
}
