package ab;

import android.content.res.Resources;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import androidx.databinding.n;
import androidx.lifecycle.a0;
import za.d0;
import za.j0;
import za.k;

/* loaded from: classes4.dex */
public class h extends g {
    private static final n.i E = null;
    private static final SparseIntArray F = null;
    private final LinearLayout C;
    private long D;

    public h(androidx.databinding.e eVar, View view) {
        this(eVar, view, n.E(eVar, view, 2, E, F));
    }

    private boolean V(a0 a0Var, int i10) {
        if (i10 != d0.f53311a) {
            return false;
        }
        synchronized (this) {
            this.D |= 1;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (d0.f53312b != i10) {
            return false;
        }
        U((k) obj);
        return true;
    }

    @Override // ab.g
    public void U(k kVar) {
        this.B = kVar;
        synchronized (this) {
            this.D |= 2;
        }
        f(d0.f53312b);
        super.J();
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        Resources resources;
        int i10;
        synchronized (this) {
            j10 = this.D;
            this.D = 0L;
        }
        k kVar = this.B;
        long j11 = j10 & 7;
        String str = null;
        if (j11 != 0) {
            a0 g02 = kVar != null ? kVar.g0() : null;
            S(0, g02);
            boolean M = n.M(g02 != null ? (Boolean) g02.f() : null);
            if (j11 != 0) {
                j10 |= M ? 16L : 8L;
            }
            if (M) {
                resources = this.A.getResources();
                i10 = j0.f53347m;
            } else {
                resources = this.A.getResources();
                i10 = j0.f53339e;
            }
            str = resources.getString(i10);
        }
        if ((j10 & 7) != 0) {
            b4.e.e(this.A, str);
        }
    }

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

    private h(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 1, (Button) objArr[1]);
        this.D = -1L;
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.C = linearLayout;
        linearLayout.setTag(null);
        this.A.setTag(null);
        P(view);
        B();
    }
}
