package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import androidx.databinding.n;
import ca.canadapost.core.common.customView.CpcTextInput;
import cg.a;
import jg.w4;

/* loaded from: classes4.dex */
public class v3 extends u3 implements a.InterfaceC0282a {
    private static final n.i J = null;
    private static final SparseIntArray K = null;
    private final LinearLayout E;
    private final View.OnClickListener F;
    private androidx.databinding.g 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() {
            String a10 = ca.canadapost.core.common.customView.u.a(v3.this.A);
            w4 w4Var = v3.this.D;
            if (w4Var != null) {
                androidx.lifecycle.f0 i02 = w4Var.i0();
                if (i02 != null) {
                    i02.q(a10);
                }
            }
        }
    }

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(v3.this.B);
            w4 w4Var = v3.this.D;
            if (w4Var != null) {
                androidx.lifecycle.f0 l02 = w4Var.l0();
                if (l02 != null) {
                    l02.q(a10);
                }
            }
        }
    }

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

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

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

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

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

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

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return Y((androidx.lifecycle.f0) obj, i11);
        }
        if (i10 == 1) {
            return W((androidx.lifecycle.a0) obj, i11);
        }
        if (i10 == 2) {
            return Z((androidx.lifecycle.f0) obj, i11);
        }
        if (i10 == 3) {
            return X((androidx.lifecycle.f0) obj, i11);
        }
        if (i10 != 4) {
            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((w4) obj);
        return true;
    }

    @Override // zf.u3
    public void U(w4 w4Var) {
        this.D = w4Var;
        synchronized (this) {
            this.I |= 32;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        w4 w4Var = this.D;
        if (w4Var != null) {
            w4Var.a0();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:24:0x0061  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x007f  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x009d  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x00b2  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        androidx.lifecycle.f0 f0Var;
        androidx.lifecycle.f0 f0Var2;
        String str;
        String str2;
        String str3;
        synchronized (this) {
            j10 = this.I;
            this.I = 0L;
        }
        w4 w4Var = this.D;
        if ((127 & j10) != 0) {
            if ((j10 & 97) != 0) {
                f0Var2 = w4Var != null ? w4Var.l0() : null;
                S(0, f0Var2);
                if (f0Var2 != null) {
                }
            } else {
                f0Var2 = null;
            }
            if ((j10 & 98) != 0) {
                androidx.lifecycle.a0 j02 = w4Var != null ? w4Var.j0() : null;
                S(1, j02);
                if (j02 != null) {
                    str3 = (String) j02.f();
                    if ((j10 & 100) != 0) {
                        androidx.lifecycle.a0 r02 = w4Var != null ? w4Var.r0() : null;
                        S(2, r02);
                        if (r02 != null) {
                            str = (String) r02.f();
                            if ((j10 & 104) != 0) {
                                androidx.lifecycle.a0 k02 = w4Var != null ? w4Var.k0() : null;
                                S(3, k02);
                                if (k02 != null) {
                                    str2 = (String) k02.f();
                                    if ((j10 & 112) == 0) {
                                        f0Var = w4Var != null ? w4Var.i0() : null;
                                        S(4, f0Var);
                                        if (f0Var != null) {
                                        }
                                    } else {
                                        f0Var = null;
                                    }
                                }
                            }
                            str2 = null;
                            if ((j10 & 112) == 0) {
                            }
                        }
                    }
                    str = null;
                    if ((j10 & 104) != 0) {
                    }
                    str2 = null;
                    if ((j10 & 112) == 0) {
                    }
                }
            }
            str3 = null;
            if ((j10 & 100) != 0) {
            }
            str = null;
            if ((j10 & 104) != 0) {
            }
            str2 = null;
            if ((j10 & 112) == 0) {
            }
        } else {
            f0Var = null;
            f0Var2 = null;
            str = null;
            str2 = null;
            str3 = null;
        }
        if ((j10 & 112) != 0) {
            ca.canadapost.core.common.customView.u.b(this.A, f0Var);
        }
        if ((64 & j10) != 0) {
            ca.canadapost.core.common.customView.u.e(this.A, this.G);
            ca.canadapost.core.common.customView.u.e(this.B, this.H);
            this.C.setOnClickListener(this.F);
        }
        if ((98 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.A, str3);
        }
        if ((104 & j10) != 0) {
            this.A.setLabel(str2);
        }
        if ((97 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.B, f0Var2);
        }
        if ((j10 & 100) != 0) {
            b4.e.e(this.C, str);
        }
    }

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

    private v3(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 5, (CpcTextInput) objArr[2], (CpcTextInput) objArr[1], (Button) objArr[3]);
        this.G = new a();
        this.H = new b();
        this.I = -1L;
        this.A.setTag(null);
        this.B.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.E = linearLayout;
        linearLayout.setTag(null);
        this.C.setTag(null);
        P(view);
        this.F = new cg.a(this, 1);
        B();
    }
}
