package u7;

import android.graphics.Typeface;
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;

/* loaded from: classes.dex */
public class q extends p {
    private static final n.i F = null;
    private static final SparseIntArray G = null;
    private final LinearLayout B;
    private final TextView C;
    private final TextView D;
    private long E;

    public q(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 3, F, G));
    }

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

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        return false;
    }

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

    @Override // u7.p
    public void U(FlexLocation.FlexLocationItem.DayHours dayHours) {
        this.A = dayHours;
        synchronized (this) {
            this.E |= 1;
        }
        f(h7.a.f20948e);
        super.J();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r14v0 */
    /* JADX WARN: Type inference failed for: r14v1, types: [int] */
    /* JADX WARN: Type inference failed for: r14v3 */
    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        Typeface typeface;
        String str;
        ?? r14;
        synchronized (this) {
            j10 = this.E;
            this.E = 0L;
        }
        FlexLocation.FlexLocationItem.DayHours dayHours = this.A;
        long j11 = j10 & 3;
        String str2 = null;
        if (j11 != 0) {
            if (dayHours != null) {
                str = dayHours.getDayOfWeek();
                r14 = dayHours.isToday();
            } else {
                r14 = 0;
                str = null;
            }
            if (j11 != 0) {
                j10 |= r14 != 0 ? 8L : 4L;
            }
            r11 = dayHours != null;
            if ((j10 & 3) != 0) {
                j10 = r11 ? j10 | 32 : j10 | 16;
            }
            typeface = Typeface.defaultFromStyle(r14);
        } else {
            typeface = null;
            str = null;
        }
        String time = ((32 & j10) == 0 || dayHours == null) ? null : dayHours.getTime();
        long j12 = j10 & 3;
        if (j12 != 0) {
            if (!r11) {
                time = this.D.getResources().getString(h7.l.f21113a);
            }
            str2 = time;
        }
        if (j12 != 0) {
            b4.e.e(this.C, str);
            this.C.setTypeface(typeface);
            b4.e.e(this.D, str2);
            this.D.setTypeface(typeface);
        }
    }

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

    private q(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 0);
        this.E = -1L;
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.B = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.C = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[2];
        this.D = textView2;
        textView2.setTag(null);
        P(view);
        B();
    }
}
