package zb;

import android.text.Html;
import android.text.Spanned;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.databinding.n;
import bc.b;
import ca.canadapost.core.common.ui.CpcDialogFragmentView;

/* loaded from: classes4.dex */
public class f1 extends e1 implements b.a {
    private static final n.i H = null;
    private static final SparseIntArray I = null;
    private final TextView C;
    private final TextView D;
    private final Button E;
    private final View.OnClickListener F;
    private long G;

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

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.G = 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 (ob.a.f31095d != i10) {
            return false;
        }
        U((cc.u) obj);
        return true;
    }

    public void U(cc.u uVar) {
        this.B = uVar;
        synchronized (this) {
            this.G |= 1;
        }
        f(ob.a.f31095d);
        super.J();
    }

    @Override // bc.b.a
    public final void a(int i10, View view) {
        cc.u uVar = this.B;
        if (uVar != null) {
            uVar.Y();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        Spanned spanned;
        synchronized (this) {
            j10 = this.G;
            this.G = 0L;
        }
        cc.u uVar = this.B;
        long j11 = 3 & j10;
        if (j11 != 0) {
            r6 = uVar != null ? uVar.T() : null;
            String string = this.C.getResources().getString(ob.l.f31312n3, r6);
            Spanned fromHtml = Html.fromHtml(this.D.getResources().getString(ob.l.f31307m3, r6));
            r6 = string;
            spanned = fromHtml;
        } else {
            spanned = null;
        }
        if (j11 != 0) {
            b4.e.e(this.C, r6);
            b4.e.e(this.D, spanned);
        }
        if ((j10 & 2) != 0) {
            w8.d0.p(this.E, this.F);
        }
    }

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

    private f1(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (CpcDialogFragmentView) objArr[0]);
        this.G = -1L;
        this.A.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.C = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[2];
        this.D = textView2;
        textView2.setTag(null);
        Button button = (Button) objArr[3];
        this.E = button;
        button.setTag(null);
        P(view);
        this.F = new bc.b(this, 1);
        B();
    }
}
