package jb;

import android.content.res.Resources;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.ui.CpcFragmentContainerFullView;
import ib.b1;
import ib.x0;
import ib.y0;
import nb.a;

/* loaded from: classes4.dex */
public class l extends k implements a.InterfaceC0683a {
    private static final n.i M;
    private static final SparseIntArray N;
    private final CpcFragmentContainerFullView I;
    private final LinearLayout J;
    private final View.OnClickListener K;
    private long L;

    static {
        n.i iVar = new n.i(9);
        M = iVar;
        iVar.a(1, new String[]{"customs_form_banner"}, new int[]{5}, new int[]{y0.f23125g});
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(x0.f23110s, 6);
        sparseIntArray.put(x0.f23112u, 7);
        sparseIntArray.put(x0.f23109r, 8);
    }

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

    private boolean U(e eVar, int i10) {
        if (i10 != ib.a.f22530a) {
            return false;
        }
        synchronized (this) {
            this.L |= 1;
        }
        return true;
    }

    private boolean V(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ib.a.f22530a) {
            return false;
        }
        synchronized (this) {
            this.L |= 2;
        }
        return true;
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return U((e) obj, i11);
        }
        if (i10 != 1) {
            return false;
        }
        return V((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 (ib.a.f22531b != i10) {
            return false;
        }
        W((ib.o) obj);
        return true;
    }

    public void W(ib.o oVar) {
        this.H = oVar;
        synchronized (this) {
            this.L |= 4;
        }
        f(ib.a.f22531b);
        super.J();
    }

    @Override // nb.a.InterfaceC0683a
    public final void a(int i10, View view) {
        ib.o oVar = this.H;
        if (oVar != null) {
            oVar.e0();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        String str;
        Resources resources;
        int i10;
        long j11;
        long j12;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        ib.o oVar = this.H;
        long j13 = j10 & 14;
        String str2 = null;
        if (j13 != 0) {
            androidx.lifecycle.a0 f02 = oVar != null ? oVar.f0() : null;
            S(1, f02);
            boolean M2 = androidx.databinding.n.M(f02 != null ? (Boolean) f02.f() : null);
            if (j13 != 0) {
                if (M2) {
                    j11 = j10 | 32;
                    j12 = 128;
                } else {
                    j11 = j10 | 16;
                    j12 = 64;
                }
                j10 = j11 | j12;
            }
            str = this.G.getResources().getString(M2 ? b1.f22623y : b1.f22625z);
            if (M2) {
                resources = this.F.getResources();
                i10 = b1.f22619w;
            } else {
                resources = this.F.getResources();
                i10 = b1.f22621x;
            }
            str2 = resources.getString(i10);
        } else {
            str = null;
        }
        if ((12 & j10) != 0) {
            this.A.U(oVar);
        }
        if ((8 & j10) != 0) {
            this.E.setOnClickListener(this.K);
        }
        if ((j10 & 14) != 0) {
            b4.e.e(this.F, str2);
            b4.e.e(this.G, str);
        }
        androidx.databinding.n.p(this.A);
    }

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

    private l(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 2, (e) objArr[5], (ImageView) objArr[8], (ImageView) objArr[6], (LinearLayout) objArr[7], (Button) objArr[4], (TextView) objArr[2], (TextView) objArr[3]);
        this.L = -1L;
        N(this.A);
        this.E.setTag(null);
        this.F.setTag(null);
        this.G.setTag(null);
        CpcFragmentContainerFullView cpcFragmentContainerFullView = (CpcFragmentContainerFullView) objArr[0];
        this.I = cpcFragmentContainerFullView;
        cpcFragmentContainerFullView.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.J = linearLayout;
        linearLayout.setTag(null);
        P(view);
        this.K = new nb.a(this, 1);
        B();
    }
}
