package zb;

import android.graphics.Bitmap;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.databinding.n;
import bc.b;
import ca.canadapost.core.common.ui.CpcFragmentContainerView;

/* loaded from: classes4.dex */
public class x extends w implements b.a {
    private static final n.i M = null;
    private static final SparseIntArray N;
    private final CpcFragmentContainerView J;
    private final View.OnClickListener K;
    private long L;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(ob.i.D0, 6);
        sparseIntArray.put(ob.i.W, 7);
        sparseIntArray.put(ob.i.L0, 8);
    }

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

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

    private boolean W(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ob.a.f31092a) {
            return false;
        }
        synchronized (this) {
            this.L |= 8;
        }
        return true;
    }

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

    private boolean Y(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != ob.a.f31092a) {
            return false;
        }
        synchronized (this) {
            this.L |= 1;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (ob.a.f31095d != i10) {
            return false;
        }
        U((ca.canadapost.module.epostprofile.account.qrcode.a) obj);
        return true;
    }

    @Override // zb.w
    public void U(ca.canadapost.module.epostprofile.account.qrcode.a aVar) {
        this.I = aVar;
        synchronized (this) {
            this.L |= 16;
        }
        f(ob.a.f31095d);
        super.J();
    }

    @Override // bc.b.a
    public final void a(int i10, View view) {
        ca.canadapost.module.epostprofile.account.qrcode.a aVar = this.I;
        if (aVar != null) {
            aVar.s0();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x003d  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0059  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x0075  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        String str;
        Bitmap bitmap;
        String str2;
        String str3;
        String str4;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        ca.canadapost.module.epostprofile.account.qrcode.a aVar = this.I;
        if ((63 & j10) != 0) {
            if ((j10 & 49) != 0) {
                androidx.lifecycle.a0 h02 = aVar != null ? aVar.h0() : null;
                S(0, h02);
                if (h02 != null) {
                    bitmap = (Bitmap) h02.f();
                    if ((j10 & 50) != 0) {
                        androidx.lifecycle.a0 c02 = aVar != null ? aVar.c0() : null;
                        S(1, c02);
                        if (c02 != null) {
                            str2 = (String) c02.f();
                            if ((j10 & 52) != 0) {
                                androidx.lifecycle.a0 X = aVar != null ? aVar.X() : null;
                                S(2, X);
                                if (X != null) {
                                    str4 = (String) X.f();
                                    if ((j10 & 56) != 0) {
                                        androidx.lifecycle.a0 b02 = aVar != null ? aVar.b0() : null;
                                        S(3, b02);
                                        if (b02 != null) {
                                            str = (String) b02.f();
                                            str3 = str4;
                                        }
                                    }
                                    str3 = str4;
                                    str = null;
                                }
                            }
                            str4 = null;
                            if ((j10 & 56) != 0) {
                            }
                            str3 = str4;
                            str = null;
                        }
                    }
                    str2 = null;
                    if ((j10 & 52) != 0) {
                    }
                    str4 = null;
                    if ((j10 & 56) != 0) {
                    }
                    str3 = str4;
                    str = null;
                }
            }
            bitmap = null;
            if ((j10 & 50) != 0) {
            }
            str2 = null;
            if ((j10 & 52) != 0) {
            }
            str4 = null;
            if ((j10 & 56) != 0) {
            }
            str3 = str4;
            str = null;
        } else {
            str = null;
            bitmap = null;
            str2 = null;
            str3 = null;
        }
        if ((j10 & 52) != 0) {
            b4.e.e(this.B, str3);
        }
        if ((56 & j10) != 0) {
            b4.e.e(this.C, str);
        }
        if ((32 & j10) != 0) {
            this.D.setOnClickListener(this.K);
        }
        if ((50 & j10) != 0) {
            b4.e.e(this.E, str2);
        }
        if ((j10 & 49) != 0) {
            u7.g.e(this.F, bitmap);
        }
    }

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

    private x(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 4, (ImageView) objArr[7], (TextView) objArr[4], (TextView) objArr[2], (Button) objArr[5], (TextView) objArr[1], (ImageView) objArr[3], (FrameLayout) objArr[6], (TextView) objArr[8]);
        this.L = -1L;
        this.B.setTag(null);
        this.C.setTag(null);
        this.D.setTag(null);
        CpcFragmentContainerView cpcFragmentContainerView = (CpcFragmentContainerView) objArr[0];
        this.J = cpcFragmentContainerView;
        cpcFragmentContainerView.setTag(null);
        this.E.setTag(null);
        this.F.setTag(null);
        P(view);
        this.K = new bc.b(this, 1);
        B();
    }
}
