package hc;

import android.text.Spannable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.ui.CpcDialogFragmentView;
import gc.b2;

/* loaded from: classes4.dex */
public class j extends i {
    private static final n.i H;
    private static final SparseIntArray I;
    private final LinearLayout F;
    private long G;

    static {
        n.i iVar = new n.i(5);
        H = iVar;
        iVar.a(1, new String[]{"apl_read_agree_button"}, new int[]{4}, new int[]{b2.f19562d});
        I = null;
    }

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

    private boolean U(g gVar, int i10) {
        if (i10 != gc.e.f19609a) {
            return false;
        }
        synchronized (this) {
            this.G |= 1;
        }
        return true;
    }

    private boolean V(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != gc.e.f19609a) {
            return false;
        }
        synchronized (this) {
            this.G |= 2;
        }
        return true;
    }

    private boolean W(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != gc.e.f19609a) {
            return false;
        }
        synchronized (this) {
            this.G |= 4;
        }
        return true;
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return U((g) obj, i11);
        }
        if (i10 == 1) {
            return V((androidx.lifecycle.a0) obj, i11);
        }
        if (i10 != 2) {
            return false;
        }
        return W((androidx.lifecycle.a0) 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 (gc.e.f19610b != i10) {
            return false;
        }
        X((gc.c) obj);
        return true;
    }

    public void X(gc.c cVar) {
        this.E = cVar;
        synchronized (this) {
            this.G |= 8;
        }
        f(gc.e.f19610b);
        super.J();
    }

    /* JADX WARN: Removed duplicated region for block: B:16:0x0038  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        CharSequence charSequence;
        CharSequence charSequence2;
        synchronized (this) {
            j10 = this.G;
            this.G = 0L;
        }
        gc.c cVar = this.E;
        CharSequence charSequence3 = null;
        if ((30 & j10) != 0) {
            if ((j10 & 26) != 0) {
                androidx.lifecycle.a0 V = cVar != null ? cVar.V() : null;
                S(1, V);
                if (V != null) {
                    charSequence2 = (Spannable) V.f();
                    if ((j10 & 28) != 0) {
                        androidx.lifecycle.a0 W = cVar != null ? cVar.W() : null;
                        S(2, W);
                        if (W != null) {
                            charSequence3 = (String) W.f();
                        }
                    }
                    charSequence = charSequence3;
                    charSequence3 = charSequence2;
                }
            }
            charSequence2 = null;
            if ((j10 & 28) != 0) {
            }
            charSequence = charSequence3;
            charSequence3 = charSequence2;
        } else {
            charSequence = null;
        }
        if ((26 & j10) != 0) {
            b4.e.e(this.C, charSequence3);
        }
        if ((j10 & 28) != 0) {
            b4.e.e(this.D, charSequence);
        }
        androidx.databinding.n.p(this.A);
    }

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

    private j(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 3, (g) objArr[4], (CpcDialogFragmentView) objArr[0], (TextView) objArr[3], (TextView) objArr[2]);
        this.G = -1L;
        N(this.A);
        this.B.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.F = linearLayout;
        linearLayout.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        P(view);
        B();
    }
}
