package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RadioGroup;
import androidx.appcompat.widget.SwitchCompat;
import androidx.databinding.n;

/* loaded from: classes4.dex */
public class p0 extends o0 {
    private static final n.i J;
    private static final SparseIntArray K;
    private final LinearLayout E;
    private final LinearLayout F;
    private final SwitchCompat G;
    private androidx.databinding.g H;
    private long I;

    /* loaded from: classes4.dex */
    class a implements androidx.databinding.g {
        a() {
        }

        @Override // androidx.databinding.g
        public void a() {
            boolean isChecked = p0.this.G.isChecked();
            jg.s sVar = p0.this.D;
            if (sVar != null) {
                androidx.lifecycle.f0 o02 = sVar.o0();
                if (o02 != null) {
                    o02.q(Boolean.valueOf(isChecked));
                }
            }
        }
    }

    static {
        n.i iVar = new n.i(6);
        J = iVar;
        iVar.a(1, new String[]{"package_delivery_option_selection_button"}, new int[]{4}, new int[]{yf.e.f52538v});
        SparseIntArray sparseIntArray = new SparseIntArray();
        K = sparseIntArray;
        sparseIntArray.put(yf.d.f52425c0, 5);
    }

    public p0(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 6, J, K));
    }

    private boolean W(m0 m0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.I |= 1;
        }
        return true;
    }

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

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

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

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

    @Override // androidx.databinding.n
    public void O(androidx.lifecycle.u uVar) {
        super.O(uVar);
        this.A.O(uVar);
    }

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

    @Override // zf.o0
    public void U(jg.s sVar) {
        this.D = sVar;
        synchronized (this) {
            this.I |= 8;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        boolean z10;
        synchronized (this) {
            j10 = this.I;
            this.I = 0L;
        }
        jg.s sVar = this.D;
        int i10 = 0;
        if ((30 & j10) != 0) {
            if ((j10 & 26) != 0) {
                androidx.lifecycle.f0 o02 = sVar != null ? sVar.o0() : null;
                S(1, o02);
                z10 = androidx.databinding.n.M(o02 != null ? (Boolean) o02.f() : null);
            } else {
                z10 = false;
            }
            long j11 = j10 & 28;
            if (j11 != 0) {
                androidx.lifecycle.f0 i02 = sVar != null ? sVar.i0() : null;
                S(2, i02);
                boolean M = androidx.databinding.n.M(i02 != null ? (Boolean) i02.f() : null);
                if (j11 != 0) {
                    j10 |= M ? 64L : 32L;
                }
                if (M) {
                    i10 = 8;
                }
            }
        } else {
            z10 = false;
        }
        if ((24 & j10) != 0) {
            this.A.U(sVar);
        }
        if ((28 & j10) != 0) {
            this.F.setVisibility(i10);
        }
        if ((j10 & 26) != 0) {
            b4.a.a(this.G, z10);
        }
        if ((j10 & 16) != 0) {
            b4.a.b(this.G, null, this.H);
        }
        androidx.databinding.n.p(this.A);
    }

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

    private p0(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 3, (m0) objArr[4], (RadioGroup) objArr[5], (LinearLayout) objArr[0]);
        this.H = new a();
        this.I = -1L;
        N(this.A);
        this.C.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.E = linearLayout;
        linearLayout.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[2];
        this.F = linearLayout2;
        linearLayout2.setTag(null);
        SwitchCompat switchCompat = (SwitchCompat) objArr[3];
        this.G = switchCompat;
        switchCompat.setTag(null);
        P(view);
        B();
    }
}
