package od;

import android.text.Html;
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 ud.a;

/* loaded from: classes4.dex */
public class p0 extends o0 implements a.InterfaceC0889a {
    private static final n.i G = null;
    private static final SparseIntArray H = null;
    private final CpcFragmentContainerView C;
    private final Button D;
    private final View.OnClickListener E;
    private long F;

    public p0(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 3, G, H));
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.F = 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((vd.a) obj);
        return true;
    }

    public void U(vd.a aVar) {
        this.B = aVar;
        synchronized (this) {
            this.F |= 1;
        }
        f(ld.a.f27862b);
        super.J();
    }

    @Override // ud.a.InterfaceC0889a
    public final void a(int i10, View view) {
        vd.a aVar = this.B;
        if (aVar != null) {
            aVar.Y();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        String str;
        synchronized (this) {
            j10 = this.F;
            this.F = 0L;
        }
        vd.a aVar = this.B;
        long j11 = 3 & j10;
        CharSequence charSequence = null;
        if (j11 != 0) {
            if (aVar != null) {
                charSequence = aVar.U();
                str = aVar.W();
            } else {
                str = null;
            }
            charSequence = Html.fromHtml(this.A.getResources().getString(ld.m.I, charSequence, str));
        }
        if ((j10 & 2) != 0) {
            w8.d0.p(this.D, this.E);
        }
        if (j11 != 0) {
            b4.e.e(this.A, charSequence);
        }
    }

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

    private p0(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (TextView) objArr[1]);
        this.F = -1L;
        CpcFragmentContainerView cpcFragmentContainerView = (CpcFragmentContainerView) objArr[0];
        this.C = cpcFragmentContainerView;
        cpcFragmentContainerView.setTag(null);
        Button button = (Button) objArr[2];
        this.D = button;
        button.setTag(null);
        this.A.setTag(null);
        P(view);
        this.E = new ud.a(this, 1);
        B();
    }
}
