package u7;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.data.flex.model.FlexLocation;
import java.util.List;

/* loaded from: classes.dex */
public class d1 extends c1 {
    private static final n.i N;
    private static final SparseIntArray O;
    private final LinearLayout C;
    private final TextView D;
    private final LinearLayout E;
    private final p F;
    private final p G;
    private final p H;
    private final p I;
    private final p J;
    private final p K;
    private final p L;
    private long M;

    static {
        n.i iVar = new n.i(11);
        N = iVar;
        iVar.a(0, new String[]{"open_24_seven"}, new int[]{10}, new int[]{h7.j.Q});
        int i10 = h7.j.f21110y;
        iVar.a(2, new String[]{"days_hours", "days_hours", "days_hours", "days_hours", "days_hours", "days_hours", "days_hours"}, new int[]{3, 4, 5, 6, 7, 8, 9}, new int[]{i10, i10, i10, i10, i10, i10, i10});
        O = null;
    }

    public d1(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 11, N, O));
    }

    private boolean V(a1 a1Var, int i10) {
        if (i10 != h7.a.f20944a) {
            return false;
        }
        synchronized (this) {
            this.M |= 1;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.M = 4L;
        }
        this.F.B();
        this.G.B();
        this.H.B();
        this.I.B();
        this.J.B();
        this.K.B();
        this.L.B();
        this.A.B();
        J();
    }

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 != 0) {
            return false;
        }
        return V((a1) obj, i11);
    }

    @Override // androidx.databinding.n
    public void O(androidx.lifecycle.u uVar) {
        super.O(uVar);
        this.F.O(uVar);
        this.G.O(uVar);
        this.H.O(uVar);
        this.I.O(uVar);
        this.J.O(uVar);
        this.K.O(uVar);
        this.L.O(uVar);
        this.A.O(uVar);
    }

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

    @Override // u7.c1
    public void U(d8.a aVar) {
        this.B = aVar;
        synchronized (this) {
            this.M |= 2;
        }
        f(h7.a.f20948e);
        super.J();
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        int i10;
        boolean z10;
        boolean z11;
        boolean z12;
        boolean z13;
        boolean z14;
        boolean z15;
        boolean z16;
        int i11;
        int i12;
        String str;
        List list;
        boolean z17;
        List list2;
        long j11;
        long j12;
        synchronized (this) {
            j10 = this.M;
            this.M = 0L;
        }
        d8.a aVar = this.B;
        long j13 = j10 & 6;
        if (j13 != 0) {
            if (aVar != null) {
                list2 = aVar.a();
                z17 = aVar.c();
                str = aVar.b();
            } else {
                z17 = false;
                str = null;
                list2 = null;
            }
            if (j13 != 0) {
                if (z17) {
                    j11 = j10 | 256;
                    j12 = 4096;
                } else {
                    j11 = j10 | 128;
                    j12 = 2048;
                }
                j10 = j11 | j12;
            }
            int size = list2 != null ? list2.size() : 0;
            int i13 = z17 ? 0 : 8;
            int i14 = z17 ? 8 : 0;
            boolean z18 = str != null;
            if ((j10 & 6) != 0) {
                j10 |= z18 ? 1048576L : 524288L;
            }
            z11 = size > 6;
            z12 = size > 2;
            z13 = size > 4;
            z14 = size > 0;
            z15 = size > 3;
            z16 = size > 5;
            z10 = size > 1;
            int i15 = z18 ? 0 : 8;
            if ((j10 & 6) != 0) {
                j10 = z11 ? j10 | 1024 : j10 | 512;
            }
            if ((j10 & 6) != 0) {
                j10 = z12 ? j10 | 4194304 : j10 | 2097152;
            }
            if ((j10 & 6) != 0) {
                j10 = z13 ? j10 | 16 : j10 | 8;
            }
            if ((j10 & 6) != 0) {
                j10 = z14 ? j10 | 65536 : j10 | 32768;
            }
            if ((j10 & 6) != 0) {
                j10 = z15 ? j10 | 16384 : j10 | 8192;
            }
            if ((j10 & 6) != 0) {
                j10 = z16 ? j10 | 262144 : j10 | 131072;
            }
            if ((j10 & 6) != 0) {
                j10 = z10 ? j10 | 64 : j10 | 32;
            }
            list = list2;
            i10 = i14;
            i11 = i15;
            i12 = i13;
        } else {
            i10 = 0;
            z10 = false;
            z11 = false;
            z12 = false;
            z13 = false;
            z14 = false;
            z15 = false;
            z16 = false;
            i11 = 0;
            i12 = 0;
            str = null;
            list = null;
        }
        FlexLocation.FlexLocationItem.DayHours dayHours = ((j10 & 16384) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(3);
        FlexLocation.FlexLocationItem.DayHours dayHours2 = ((j10 & 65536) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(0);
        FlexLocation.FlexLocationItem.DayHours dayHours3 = ((j10 & 16) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(4);
        FlexLocation.FlexLocationItem.DayHours dayHours4 = ((j10 & 64) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(1);
        FlexLocation.FlexLocationItem.DayHours dayHours5 = ((j10 & 262144) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(5);
        FlexLocation.FlexLocationItem.DayHours dayHours6 = ((j10 & 4194304) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(2);
        FlexLocation.FlexLocationItem.DayHours dayHours7 = ((j10 & 1024) == 0 || list == null) ? null : (FlexLocation.FlexLocationItem.DayHours) list.get(6);
        long j14 = j10 & 6;
        if (j14 != 0) {
            if (!z13) {
                dayHours3 = null;
            }
            if (!z10) {
                dayHours4 = null;
            }
            if (!z11) {
                dayHours7 = null;
            }
            if (!z15) {
                dayHours = null;
            }
            if (!z14) {
                dayHours2 = null;
            }
            if (!z16) {
                dayHours5 = null;
            }
            if (!z12) {
                dayHours6 = null;
            }
        } else {
            dayHours7 = null;
            dayHours6 = null;
            dayHours5 = null;
            dayHours4 = null;
            dayHours2 = null;
            dayHours3 = null;
            dayHours = null;
        }
        if (j14 != 0) {
            this.A.x().setVisibility(i12);
            b4.e.e(this.D, str);
            this.D.setVisibility(i11);
            this.E.setVisibility(i10);
            this.F.U(dayHours2);
            this.G.U(dayHours4);
            this.H.U(dayHours6);
            this.I.U(dayHours);
            this.J.U(dayHours3);
            this.K.U(dayHours5);
            this.L.U(dayHours7);
        }
        androidx.databinding.n.p(this.F);
        androidx.databinding.n.p(this.G);
        androidx.databinding.n.p(this.H);
        androidx.databinding.n.p(this.I);
        androidx.databinding.n.p(this.J);
        androidx.databinding.n.p(this.K);
        androidx.databinding.n.p(this.L);
        androidx.databinding.n.p(this.A);
    }

    @Override // androidx.databinding.n
    public boolean z() {
        synchronized (this) {
            if (this.M != 0) {
                return true;
            }
            return this.F.z() || this.G.z() || this.H.z() || this.I.z() || this.J.z() || this.K.z() || this.L.z() || this.A.z();
        }
    }

    private d1(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 1, (a1) objArr[10]);
        this.M = -1L;
        N(this.A);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.C = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.D = textView;
        textView.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[2];
        this.E = linearLayout2;
        linearLayout2.setTag(null);
        p pVar = (p) objArr[3];
        this.F = pVar;
        N(pVar);
        p pVar2 = (p) objArr[4];
        this.G = pVar2;
        N(pVar2);
        p pVar3 = (p) objArr[5];
        this.H = pVar3;
        N(pVar3);
        p pVar4 = (p) objArr[6];
        this.I = pVar4;
        N(pVar4);
        p pVar5 = (p) objArr[7];
        this.J = pVar5;
        N(pVar5);
        p pVar6 = (p) objArr[8];
        this.K = pVar6;
        N(pVar6);
        p pVar7 = (p) objArr[9];
        this.L = pVar7;
        N(pVar7);
        P(view);
        B();
    }
}
