package u7;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.data.addresscomplete.webservice.AddressCompleteFindItem;

/* loaded from: classes.dex */
public class d0 extends c0 {
    private static final n.i H = null;
    private static final SparseIntArray I = null;
    private final LinearLayout D;
    private final TextView E;
    private final ImageView F;
    private long G;

    public d0(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 5, 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 (h7.a.f20948e != i10) {
            return false;
        }
        U((AddressCompleteFindItem) obj);
        return true;
    }

    @Override // u7.c0
    public void U(AddressCompleteFindItem addressCompleteFindItem) {
        this.C = addressCompleteFindItem;
        synchronized (this) {
            this.G |= 1;
        }
        f(h7.a.f20948e);
        super.J();
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        String str;
        String str2;
        boolean z10;
        String str3;
        synchronized (this) {
            j10 = this.G;
            this.G = 0L;
        }
        AddressCompleteFindItem addressCompleteFindItem = this.C;
        long j11 = j10 & 3;
        String str4 = null;
        if (j11 != 0) {
            if (addressCompleteFindItem != null) {
                str4 = addressCompleteFindItem.getAddressesCount();
                str2 = addressCompleteFindItem.Text;
                str3 = addressCompleteFindItem.getDescriptionWithoutAddressesCount();
                z10 = addressCompleteFindItem.canFindMore();
            } else {
                z10 = false;
                str2 = null;
                str3 = null;
            }
            if (j11 != 0) {
                j10 |= z10 ? 8L : 4L;
            }
            r8 = z10 ? 0 : 8;
            str = str4;
            str4 = str3;
        } else {
            str = null;
            str2 = null;
        }
        if ((j10 & 3) != 0) {
            b4.e.e(this.A, str4);
            b4.e.e(this.B, str2);
            b4.e.e(this.E, str);
            this.E.setVisibility(r8);
            this.F.setVisibility(r8);
        }
    }

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

    private d0(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0, (TextView) objArr[4], (TextView) objArr[1]);
        this.G = -1L;
        this.A.setTag(null);
        this.B.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.D = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[2];
        this.E = textView;
        textView.setTag(null);
        ImageView imageView = (ImageView) objArr[3];
        this.F = imageView;
        imageView.setTag(null);
        P(view);
        B();
    }
}
