package u7;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.customView.CpcTextInput;
import ca.canadapost.core.common.ui.CpcFragmentContainerView;
import f8.b;

/* loaded from: classes.dex */
public class x0 extends w0 implements b.a {
    private static final n.i K = null;
    private static final SparseIntArray L = null;
    private final CpcFragmentContainerView D;
    private final TextView E;
    private final Button F;
    private final View.OnClickListener G;
    private androidx.databinding.g H;
    private androidx.databinding.g I;
    private long J;

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(x0.this.A);
            t8.d dVar = x0.this.C;
            if (dVar != null) {
                androidx.lifecycle.f0 r02 = dVar.r0();
                if (r02 != null) {
                    r02.q(a10);
                }
            }
        }
    }

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

        @Override // androidx.databinding.g
        public void a() {
            String a10 = ca.canadapost.core.common.customView.u.a(x0.this.B);
            t8.d dVar = x0.this.C;
            if (dVar != null) {
                androidx.lifecycle.f0 t02 = dVar.t0();
                if (t02 != null) {
                    t02.q(a10);
                }
            }
        }
    }

    public x0(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 5, K, L));
    }

    private boolean U(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.J |= 1;
        }
        return true;
    }

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

    private boolean W(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.J |= 8;
        }
        return true;
    }

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

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return U((androidx.lifecycle.f0) 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.f0) obj, i11);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (h7.a.f20948e != i10) {
            return false;
        }
        Y((t8.d) obj);
        return true;
    }

    public void Y(t8.d dVar) {
        this.C = dVar;
        synchronized (this) {
            this.J |= 16;
        }
        f(h7.a.f20948e);
        super.J();
    }

    @Override // f8.b.a
    public final void a(int i10, View view) {
        t8.d dVar = this.C;
        if (dVar != null) {
            dVar.D0();
        }
    }

    /* 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 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:63:0x0095  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        String str;
        androidx.lifecycle.f0 f0Var;
        String str2;
        androidx.lifecycle.f0 f0Var2;
        String str3;
        synchronized (this) {
            j10 = this.J;
            this.J = 0L;
        }
        t8.d dVar = this.C;
        String str4 = null;
        if ((63 & j10) != 0) {
            if ((j10 & 49) != 0) {
                f0Var = dVar != null ? dVar.r0() : null;
                S(0, f0Var);
                if (f0Var != null) {
                }
            } else {
                f0Var = null;
            }
            if ((j10 & 50) != 0) {
                androidx.lifecycle.a0 u02 = dVar != null ? dVar.u0() : null;
                S(1, u02);
                if (u02 != null) {
                    str3 = (String) u02.f();
                    if ((j10 & 52) != 0) {
                        androidx.lifecycle.a0 s02 = dVar != null ? dVar.s0() : null;
                        S(2, s02);
                        if (s02 != null) {
                            str2 = (String) s02.f();
                            if ((j10 & 56) != 0) {
                                f0Var2 = dVar != null ? dVar.t0() : null;
                                S(3, f0Var2);
                                if (f0Var2 != null) {
                                }
                            } else {
                                f0Var2 = null;
                            }
                            if ((j10 & 48) != 0 && dVar != null) {
                                str4 = dVar.v0();
                            }
                            str = str4;
                        }
                    }
                    str2 = null;
                    if ((j10 & 56) != 0) {
                    }
                    if ((j10 & 48) != 0) {
                        str4 = dVar.v0();
                    }
                    str = str4;
                }
            }
            str3 = null;
            if ((j10 & 52) != 0) {
            }
            str2 = null;
            if ((j10 & 56) != 0) {
            }
            if ((j10 & 48) != 0) {
            }
            str = str4;
        } else {
            str = null;
            f0Var = null;
            str2 = null;
            f0Var2 = null;
            str3 = null;
        }
        if ((j10 & 52) != 0) {
            ca.canadapost.core.common.customView.u.d(this.A, str2);
        }
        if ((49 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.A, f0Var);
        }
        if ((32 & j10) != 0) {
            ca.canadapost.core.common.customView.u.e(this.A, this.H);
            ca.canadapost.core.common.customView.u.e(this.B, this.I);
            this.F.setOnClickListener(this.G);
        }
        if ((50 & j10) != 0) {
            ca.canadapost.core.common.customView.u.d(this.B, str3);
        }
        if ((56 & j10) != 0) {
            ca.canadapost.core.common.customView.u.b(this.B, f0Var2);
        }
        if ((j10 & 48) != 0) {
            b4.e.e(this.E, str);
        }
    }

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

    private x0(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 4, (CpcTextInput) objArr[2], (CpcTextInput) objArr[3]);
        this.H = new a();
        this.I = new b();
        this.J = -1L;
        this.A.setTag(null);
        this.B.setTag(null);
        CpcFragmentContainerView cpcFragmentContainerView = (CpcFragmentContainerView) objArr[0];
        this.D = cpcFragmentContainerView;
        cpcFragmentContainerView.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.E = textView;
        textView.setTag(null);
        Button button = (Button) objArr[4];
        this.F = button;
        button.setTag(null);
        P(view);
        this.G = new f8.b(this, 1);
        B();
    }
}
