package com.toughra.ustadmobile.databinding;
import com.toughra.ustadmobile.R;
import com.toughra.ustadmobile.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class ItemClazzLogAttendanceListBindingImpl extends ItemClazzLogAttendanceListBinding implements com.toughra.ustadmobile.generated.callback.OnClickListener.Listener {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = new android.util.SparseIntArray();
        sViewsWithIds.put(R.id.mtrl_calendar_day_selector_frame, 7);
        sViewsWithIds.put(R.id.attendance_line, 8);
    }
    // views
    @NonNull
    private final android.widget.TextView mboundView1;
    @NonNull
    private final android.view.View mboundView3;
    @NonNull
    private final android.view.View mboundView4;
    @NonNull
    private final android.view.View mboundView5;
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback122;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemClazzLogAttendanceListBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 9, sIncludes, sViewsWithIds));
    }
    private ItemClazzLogAttendanceListBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (android.widget.LinearLayout) bindings[8]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
            , (android.widget.TextView) bindings[2]
            , (android.widget.TextView) bindings[6]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[7]
            );
        this.itemClazzLogAttendanceList.setTag(null);
        this.line1Text.setTag(null);
        this.line2Text.setTag(null);
        this.mboundView1 = (android.widget.TextView) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView3 = (android.view.View) bindings[3];
        this.mboundView3.setTag(null);
        this.mboundView4 = (android.view.View) bindings[4];
        this.mboundView4.setTag(null);
        this.mboundView5 = (android.view.View) bindings[5];
        this.mboundView5.setTag(null);
        setRootTag(root);
        // listeners
        mCallback122 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x20L;
        }
        requestRebind();
    }

    @Override
    public boolean hasPendingBindings() {
        synchronized(this) {
            if (mDirtyFlags != 0) {
                return true;
            }
        }
        return false;
    }

    @Override
    public boolean setVariable(int variableId, @Nullable Object variable)  {
        boolean variableSet = true;
        if (BR.clazzLog == variableId) {
            setClazzLog((com.ustadmobile.lib.db.entities.ClazzLog) variable);
        }
        else if (BR.presenter == variableId) {
            setPresenter((com.ustadmobile.core.controller.ClazzLogListAttendancePresenter) variable);
        }
        else if (BR.selectablePagedListAdapter == variableId) {
            setSelectablePagedListAdapter((com.ustadmobile.port.android.view.ClazzLogListAttendanceFragment.ClazzLogListRecyclerAdapter) variable);
        }
        else if (BR.clazzLocalTimeZone == variableId) {
            setClazzLocalTimeZone((java.util.TimeZone) variable);
        }
        else if (BR.clazzLogLocalTime == variableId) {
            setClazzLogLocalTime((com.soywiz.klock.DateTimeTz) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setClazzLog(@Nullable com.ustadmobile.lib.db.entities.ClazzLog ClazzLog) {
        this.mClazzLog = ClazzLog;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.clazzLog);
        super.requestRebind();
    }
    public void setPresenter(@Nullable com.ustadmobile.core.controller.ClazzLogListAttendancePresenter Presenter) {
        this.mPresenter = Presenter;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.presenter);
        super.requestRebind();
    }
    public void setSelectablePagedListAdapter(@Nullable com.ustadmobile.port.android.view.ClazzLogListAttendanceFragment.ClazzLogListRecyclerAdapter SelectablePagedListAdapter) {
        this.mSelectablePagedListAdapter = SelectablePagedListAdapter;
    }
    public void setClazzLocalTimeZone(@Nullable java.util.TimeZone ClazzLocalTimeZone) {
        this.mClazzLocalTimeZone = ClazzLocalTimeZone;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.clazzLocalTimeZone);
        super.requestRebind();
    }
    public void setClazzLogLocalTime(@Nullable com.soywiz.klock.DateTimeTz ClazzLogLocalTime) {
        this.mClazzLogLocalTime = ClazzLogLocalTime;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.clazzLogLocalTime);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        long clazzLogClazzLogUid = 0;
        int clazzLogClazzLogNumPresent = 0;
        com.ustadmobile.lib.db.entities.ClazzLog clazzLog = mClazzLog;
        com.ustadmobile.core.controller.ClazzLogListAttendancePresenter presenter = mPresenter;
        int clazzLogClazzLogNumPartial = 0;
        java.util.TimeZone clazzLocalTimeZone = mClazzLocalTimeZone;
        long clazzLogLogDate = 0;
        com.soywiz.klock.DateTimeTz clazzLogLocalTime = mClazzLogLocalTime;
        int clazzLogClazzLogNumAbsent = 0;

        if ((dirtyFlags & 0x29L) != 0) {


            if ((dirtyFlags & 0x21L) != 0) {

                    if (clazzLog != null) {
                        // read clazzLog.clazzLogUid
                        clazzLogClazzLogUid = clazzLog.getClazzLogUid();
                        // read clazzLog.clazzLogNumPresent
                        clazzLogClazzLogNumPresent = clazzLog.getClazzLogNumPresent();
                        // read clazzLog.clazzLogNumPartial
                        clazzLogClazzLogNumPartial = clazzLog.getClazzLogNumPartial();
                        // read clazzLog.clazzLogNumAbsent
                        clazzLogClazzLogNumAbsent = clazzLog.getClazzLogNumAbsent();
                    }
            }

                if (clazzLog != null) {
                    // read clazzLog.logDate
                    clazzLogLogDate = clazzLog.getLogDate();
                }
        }
        if ((dirtyFlags & 0x30L) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            this.itemClazzLogAttendanceList.setOnClickListener(mCallback122);
            com.ustadmobile.port.android.view.binding.ViewBindingsKt.backgroundIfAnimated(this.itemClazzLogAttendanceList, androidx.appcompat.content.res.AppCompatResources.getDrawable(itemClazzLogAttendanceList.getContext(), R.drawable.bg_listitem));
        }
        if ((dirtyFlags & 0x21L) != 0) {
            // api target 1

            this.itemClazzLogAttendanceList.setTag(clazzLogClazzLogUid);
            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextClazzLogStatus(this.line2Text, clazzLog);
            com.ustadmobile.port.android.view.binding.ViewBindingsKt.setLinearLayoutWeight(this.mboundView3, clazzLogClazzLogNumPresent);
            com.ustadmobile.port.android.view.binding.ViewBindingsKt.setLinearLayoutWeight(this.mboundView4, clazzLogClazzLogNumPartial);
            com.ustadmobile.port.android.view.binding.ViewBindingsKt.setLinearLayoutWeight(this.mboundView5, clazzLogClazzLogNumAbsent);
        }
        if ((dirtyFlags & 0x29L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextLocalDayAndTime(this.line1Text, clazzLogLogDate, clazzLocalTimeZone);
        }
        if ((dirtyFlags & 0x30L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextShortDayOfWeek(this.mboundView1, clazzLogLocalTime);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        // localize variables for thread safety
        // presenter != null
        boolean presenterJavaLangObjectNull = false;
        // presenter
        com.ustadmobile.core.controller.ClazzLogListAttendancePresenter presenter = mPresenter;
        // clazzLog
        com.ustadmobile.lib.db.entities.ClazzLog clazzLog = mClazzLog;



        presenterJavaLangObjectNull = (presenter) != (null);
        if (presenterJavaLangObjectNull) {



            presenter.handleClickEntry(clazzLog);
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): clazzLog
        flag 1 (0x2L): presenter
        flag 2 (0x3L): selectablePagedListAdapter
        flag 3 (0x4L): clazzLocalTimeZone
        flag 4 (0x5L): clazzLogLocalTime
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}