package ec;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.databinding.n;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.material.chip.Chip;

/* loaded from: classes4.dex */
public class p extends o {
    private static final n.i M = null;
    private static final SparseIntArray N;
    private final ConstraintLayout J;
    private final TextView K;
    private long L;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(dc.d0.f16013p0, 2);
        sparseIntArray.put(dc.d0.W, 3);
        sparseIntArray.put(dc.d0.f16011o0, 4);
        sparseIntArray.put(dc.d0.f16012p, 5);
        sparseIntArray.put(dc.d0.f16014q, 6);
        sparseIntArray.put(dc.d0.J, 7);
        sparseIntArray.put(dc.d0.X, 8);
        sparseIntArray.put(dc.d0.f15996h, 9);
    }

    public p(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 10, M, N));
    }

    private boolean W(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != dc.a.f15951a) {
            return false;
        }
        synchronized (this) {
            this.L |= 1;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.L = 4L;
        }
        J();
    }

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 != 0) {
            return false;
        }
        return W((androidx.lifecycle.a0) obj, i11);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (dc.a.f15952b != i10) {
            return false;
        }
        X((ca.canadapost.module.findrate.c) obj);
        return true;
    }

    public void X(ca.canadapost.module.findrate.c cVar) {
        this.I = cVar;
        synchronized (this) {
            this.L |= 2;
        }
        f(dc.a.f15952b);
        super.J();
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        ca.canadapost.module.findrate.c cVar = this.I;
        long j11 = j10 & 7;
        int i10 = 0;
        if (j11 != 0) {
            androidx.lifecycle.a0 l02 = cVar != null ? cVar.l0() : null;
            S(0, l02);
            boolean z10 = androidx.databinding.n.K(l02 != null ? (Float) l02.f() : null) > BitmapDescriptorFactory.HUE_RED;
            if (j11 != 0) {
                j10 |= z10 ? 16L : 8L;
            }
            if (z10) {
                i10 = 8;
            }
        }
        if ((j10 & 7) != 0) {
            this.K.setVisibility(i10);
        }
    }

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

    private p(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 1, (Chip) objArr[9], (LinearLayout) objArr[5], (TextView) objArr[6], (LinearLayout) objArr[7], (ImageView) objArr[3], (Chip) objArr[8], (TextView) objArr[4], (TextView) objArr[2]);
        this.L = -1L;
        ConstraintLayout constraintLayout = (ConstraintLayout) objArr[0];
        this.J = constraintLayout;
        constraintLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.K = textView;
        textView.setTag(null);
        P(view);
        B();
    }
}
