package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import androidx.databinding.n;
import cg.a;

/* loaded from: classes4.dex */
public class j2 extends i2 implements a.InterfaceC0282a {
    private static final n.i H = null;
    private static final SparseIntArray I;
    private final LinearLayout D;
    private final View.OnClickListener E;
    private final View.OnClickListener F;
    private long G;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        I = sparseIntArray;
        sparseIntArray.put(yf.d.f52461o0, 2);
    }

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

    private boolean V(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.G |= 1;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d != i10) {
            return false;
        }
        U((jg.i3) obj);
        return true;
    }

    @Override // zf.i2
    public void U(jg.i3 i3Var) {
        this.C = i3Var;
        synchronized (this) {
            this.G |= 2;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            jg.i3 i3Var = this.C;
            if (i3Var != null) {
                i3Var.R0();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        jg.i3 i3Var2 = this.C;
        if (i3Var2 != null) {
            i3Var2.T0();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.G;
            this.G = 0L;
        }
        jg.i3 i3Var = this.C;
        long j11 = j10 & 7;
        int i10 = 0;
        if (j11 != 0) {
            androidx.lifecycle.f0 N0 = i3Var != null ? i3Var.N0() : null;
            S(0, N0);
            boolean M = androidx.databinding.n.M(N0 != null ? (Boolean) N0.f() : null);
            if (j11 != 0) {
                j10 |= M ? 16L : 8L;
            }
            if (!M) {
                i10 = 8;
            }
        }
        if ((4 & j10) != 0) {
            w8.d0.p(this.A, this.E);
            w8.d0.p(this.B, this.F);
        }
        if ((j10 & 7) != 0) {
            this.A.setVisibility(i10);
        }
    }

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

    private j2(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 1, (View) objArr[2], (Button) objArr[1]);
        this.G = -1L;
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.D = linearLayout;
        linearLayout.setTag(null);
        this.B.setTag(null);
        P(view);
        this.E = new cg.a(this, 1);
        this.F = new cg.a(this, 2);
        B();
    }
}
