package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.databinding.n;
import androidx.viewpager.widget.ViewPager;
import ca.canadapost.core.common.customView.CustomSlidingTabLayout;
import cg.a;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

/* loaded from: classes4.dex */
public class z1 extends y1 implements a.InterfaceC0282a {
    private static final n.i O;
    private static final SparseIntArray P;
    private final LinearLayout K;
    private final LinearLayout L;
    private final View.OnClickListener M;
    private long N;

    static {
        n.i iVar = new n.i(10);
        O = iVar;
        iVar.a(1, new String[]{"package_item_header"}, new int[]{4}, new int[]{yf.e.Z});
        SparseIntArray sparseIntArray = new SparseIntArray();
        P = sparseIntArray;
        sparseIntArray.put(yf.d.f52448k, 3);
        sparseIntArray.put(yf.d.H0, 5);
        sparseIntArray.put(yf.d.f52442i, 6);
        sparseIntArray.put(yf.d.f52484w, 7);
        sparseIntArray.put(yf.d.f52419a0, 8);
        sparseIntArray.put(yf.d.P0, 9);
    }

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

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

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

    private boolean Y(u2 u2Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.N |= 1;
        }
        return true;
    }

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

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

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

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d == i10) {
            V((ca.canadapost.module.track.views.f) obj);
        } else {
            if (yf.a.f52371b != i10) {
                return false;
            }
            U((yf.q) obj);
        }
        return true;
    }

    @Override // zf.y1
    public void U(yf.q qVar) {
        this.J = qVar;
        synchronized (this) {
            this.N |= 16;
        }
        f(yf.a.f52371b);
        super.J();
    }

    @Override // zf.y1
    public void V(ca.canadapost.module.track.views.f fVar) {
        this.I = fVar;
        synchronized (this) {
            this.N |= 8;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        ca.canadapost.module.track.views.f fVar = this.I;
        if (fVar != null) {
            fVar.M0();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0031  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x004d  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0056  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0062  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0069  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        jg.w3 w3Var;
        long j11;
        synchronized (this) {
            j10 = this.N;
            this.N = 0L;
        }
        ca.canadapost.module.track.views.f fVar = this.I;
        yf.q qVar = this.J;
        long j12 = 44 & j10;
        Boolean bool = null;
        if (j12 != 0) {
            androidx.lifecycle.f0 F0 = fVar != null ? fVar.F0() : null;
            S(2, F0);
            if (F0 != null) {
                w3Var = (jg.w3) F0.f();
                j11 = 50 & j10;
                if (j11 != 0) {
                    androidx.lifecycle.a0 q02 = qVar != null ? qVar.q0() : null;
                    S(1, q02);
                    if (q02 != null) {
                        bool = (Boolean) q02.f();
                    }
                }
                if ((32 & j10) != 0) {
                    this.E.setOnClickListener(this.M);
                }
                if (j11 != 0) {
                    u7.g.k(this.E, bool);
                }
                if ((j10 & 40) != 0) {
                    this.H.V(fVar);
                }
                if (j12 != 0) {
                    this.H.U(w3Var);
                }
                androidx.databinding.n.p(this.H);
            }
        }
        w3Var = null;
        j11 = 50 & j10;
        if (j11 != 0) {
        }
        if ((32 & j10) != 0) {
        }
        if (j11 != 0) {
        }
        if ((j10 & 40) != 0) {
        }
        if (j12 != 0) {
        }
        androidx.databinding.n.p(this.H);
    }

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

    private z1(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 3, (AppBarLayout) objArr[6], (View) objArr[3], (CollapsingToolbarLayout) objArr[7], (CustomSlidingTabLayout) objArr[8], (FloatingActionButton) objArr[2], (CoordinatorLayout) objArr[5], (ViewPager) objArr[9], (u2) objArr[4]);
        this.N = -1L;
        this.E.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.K = linearLayout;
        linearLayout.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[1];
        this.L = linearLayout2;
        linearLayout2.setTag(null);
        N(this.H);
        P(view);
        this.M = new cg.a(this, 1);
        B();
    }
}
