package xe;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.core.widget.NestedScrollView;
import androidx.databinding.n;
import androidx.lifecycle.f0;
import ca.canadapost.core.common.customView.CpcTextInput;

/* loaded from: classes4.dex */
public class p extends o {
    private static final n.i O;
    private static final SparseIntArray P;
    private final RelativeLayout I;
    private final LinearLayout J;
    private androidx.databinding.g K;
    private androidx.databinding.g L;
    private androidx.databinding.g M;
    private long N;

    /* 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(p.this.B);
            we.r rVar = p.this.H;
            if (rVar != null) {
                f0 z12 = rVar.z1();
                if (z12 != null) {
                    z12.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(p.this.D);
            we.r rVar = p.this.H;
            if (rVar != null) {
                f0 B1 = rVar.B1();
                if (B1 != null) {
                    B1.q(a10);
                }
            }
        }
    }

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(p.this.F);
            we.r rVar = p.this.H;
            if (rVar != null) {
                f0 F1 = rVar.F1();
                if (F1 != null) {
                    F1.q(a10);
                }
            }
        }
    }

    static {
        n.i iVar = new n.i(9);
        O = iVar;
        iVar.a(1, new String[]{"address_complete_content", "registration_continue_button"}, new int[]{6, 7}, new int[]{h7.j.f21086a, we.e.f49166c});
        SparseIntArray sparseIntArray = new SparseIntArray();
        P = sparseIntArray;
        sparseIntArray.put(we.d.f49147i, 5);
        sparseIntArray.put(we.d.f49156r, 8);
    }

    public p(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 9, O, P));
    }

    private boolean V(u7.a aVar, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 16;
        }
        return true;
    }

    private boolean W(f0 f0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 2;
        }
        return true;
    }

    private boolean X(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 128;
        }
        return true;
    }

    private boolean Y(f0 f0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 4;
        }
        return true;
    }

    private boolean Z(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 64;
        }
        return true;
    }

    private boolean a0(f0 f0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 1;
        }
        return true;
    }

    private boolean b0(androidx.lifecycle.a0 a0Var, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 8;
        }
        return true;
    }

    private boolean c0(e eVar, int i10) {
        if (i10 != we.a.f49130a) {
            return false;
        }
        synchronized (this) {
            this.N |= 32;
        }
        return true;
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        switch (i10) {
            case 0:
                return a0((f0) obj, i11);
            case 1:
                return W((f0) obj, i11);
            case 2:
                return Y((f0) obj, i11);
            case 3:
                return b0((androidx.lifecycle.a0) obj, i11);
            case 4:
                return V((u7.a) obj, i11);
            case 5:
                return c0((e) obj, i11);
            case 6:
                return Z((androidx.lifecycle.a0) obj, i11);
            case 7:
                return X((androidx.lifecycle.a0) obj, i11);
            default:
                return false;
        }
    }

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

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

    @Override // xe.o
    public void U(we.r rVar) {
        this.H = rVar;
        synchronized (this) {
            this.N |= 256;
        }
        f(we.a.f49131b);
        super.J();
    }

    /* JADX WARN: Removed duplicated region for block: B:38:0x009d  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x00bd  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        String str;
        String str2;
        String str3;
        f0 f0Var;
        f0 f0Var2;
        f0 f0Var3;
        f0 f0Var4;
        synchronized (this) {
            j10 = this.N;
            this.N = 0L;
        }
        we.r rVar = this.H;
        String str4 = null;
        if ((975 & j10) != 0) {
            if ((j10 & 769) != 0) {
                f0Var4 = rVar != null ? rVar.F1() : null;
                S(0, f0Var4);
                if (f0Var4 != null) {
                }
            } else {
                f0Var4 = null;
            }
            if ((j10 & 770) != 0) {
                f0Var3 = rVar != null ? rVar.z1() : null;
                S(1, f0Var3);
                if (f0Var3 != null) {
                }
            } else {
                f0Var3 = null;
            }
            if ((j10 & 772) != 0) {
                f0Var2 = rVar != null ? rVar.B1() : null;
                S(2, f0Var2);
                if (f0Var2 != null) {
                }
            } else {
                f0Var2 = null;
            }
            if ((j10 & 776) != 0) {
                androidx.lifecycle.a0 G1 = rVar != null ? rVar.G1() : null;
                S(3, G1);
                if (G1 != null) {
                    str2 = (String) G1.f();
                    if ((j10 & 832) != 0) {
                        androidx.lifecycle.a0 C1 = rVar != null ? rVar.C1() : null;
                        S(6, C1);
                        if (C1 != null) {
                            str3 = (String) C1.f();
                            if ((j10 & 896) != 0) {
                                androidx.lifecycle.a0 A1 = rVar != null ? rVar.A1() : null;
                                S(7, A1);
                                if (A1 != null) {
                                    str4 = (String) A1.f();
                                }
                            }
                            f0Var = f0Var4;
                            str = str4;
                        }
                    }
                    str3 = null;
                    if ((j10 & 896) != 0) {
                    }
                    f0Var = f0Var4;
                    str = str4;
                }
            }
            str2 = null;
            if ((j10 & 832) != 0) {
            }
            str3 = null;
            if ((j10 & 896) != 0) {
            }
            f0Var = f0Var4;
            str = str4;
        } else {
            str = null;
            str2 = null;
            str3 = null;
            f0Var = null;
            f0Var2 = null;
            f0Var3 = null;
        }
        if ((j10 & 768) != 0) {
            this.A.U(rVar);
        }
        if ((j10 & 896) != 0) {
            ca.canadapost.core.common.customView.u.d(this.B, str);
        }
        if ((j10 & 770) != 0) {
            ca.canadapost.core.common.customView.u.b(this.B, f0Var3);
        }
        if ((512 & j10) != 0) {
            ca.canadapost.core.common.customView.u.e(this.B, this.K);
            ca.canadapost.core.common.customView.u.e(this.D, this.L);
            ca.canadapost.core.common.customView.u.e(this.F, this.M);
        }
        if ((j10 & 832) != 0) {
            ca.canadapost.core.common.customView.u.d(this.D, str3);
        }
        if ((772 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.D, f0Var2);
        }
        if ((776 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.F, str2);
        }
        if ((j10 & 769) != 0) {
            ca.canadapost.core.common.customView.u.b(this.F, f0Var);
        }
        androidx.databinding.n.p(this.A);
        androidx.databinding.n.p(this.E);
    }

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

    private p(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 8, (u7.a) objArr[6], (CpcTextInput) objArr[2], (View) objArr[5], (CpcTextInput) objArr[3], (e) objArr[7], (CpcTextInput) objArr[4], (NestedScrollView) objArr[8]);
        this.K = new a();
        this.L = new b();
        this.M = new c();
        this.N = -1L;
        N(this.A);
        this.B.setTag(null);
        this.D.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.I = relativeLayout;
        relativeLayout.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.J = linearLayout;
        linearLayout.setTag(null);
        N(this.E);
        this.F.setTag(null);
        P(view);
        B();
    }
}
