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 ItemCourseDetailHeaderOverviewBindingImpl extends ItemCourseDetailHeaderOverviewBinding 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.fragment_clazz_detail_overview_membersicon, 11);
        sViewsWithIds.put(R.id.fragment_clazz_detail_num_members_label, 12);
        sViewsWithIds.put(R.id.fragment_clazz_detail_join_icon, 13);
        sViewsWithIds.put(R.id.fragment_clazz_detail_clazzcode_label, 14);
        sViewsWithIds.put(R.id.clazzcode_bottom_barrier, 15);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_school_icon, 16);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_daterange_icon, 17);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_holidaycalendar_icon, 18);
    }
    // views
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback53;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemCourseDetailHeaderOverviewBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 19, sIncludes, sViewsWithIds));
    }
    private ItemCourseDetailHeaderOverviewBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.Barrier) bindings[15]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[3]
            , (android.widget.TextView) bindings[14]
            , (android.widget.TextView) bindings[4]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[13]
            , (android.widget.TextView) bindings[12]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[17]
            , (android.widget.TextView) bindings[8]
            , (android.widget.TextView) bindings[1]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[18]
            , (android.widget.TextView) bindings[10]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[11]
            , (android.widget.TextView) bindings[2]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[16]
            , (android.widget.LinearLayout) bindings[5]
            , (android.widget.TextView) bindings[6]
            , (android.widget.LinearLayout) bindings[7]
            , (android.widget.LinearLayout) bindings[9]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
            );
        this.fragmentClazzDetailClasscodeLayout.setTag(null);
        this.fragmentClazzDetailClazzcodeText.setTag(null);
        this.fragmentClazzDetailOverviewDaterangeText.setTag(null);
        this.fragmentClazzDetailOverviewDescriptionText.setTag(null);
        this.fragmentClazzDetailOverviewHolidaycalendarText.setTag(null);
        this.fragmentClazzDetailOverviewNumMembers.setTag(null);
        this.fragmentClazzDetailOverviewSchoolLinlayout.setTag(null);
        this.fragmentClazzDetailOverviewSchoolNameText.setTag(null);
        this.fragmentClazzStartEndDateLinearlayout.setTag(null);
        this.fragmentClazzStartHolidaycalendarLinearlayout.setTag(null);
        this.itemCourseDetailHeaderLayout.setTag(null);
        setRootTag(root);
        // listeners
        mCallback53 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x10L;
        }
        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.teacherStudentCount == variableId) {
            setTeacherStudentCount((java.lang.String) variable);
        }
        else if (BR.clazz == variableId) {
            setClazz((com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails) variable);
        }
        else if (BR.clazzCodeVisible == variableId) {
            setClazzCodeVisible((boolean) variable);
        }
        else if (BR.fragmentEventHandler == variableId) {
            setFragmentEventHandler((com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setTeacherStudentCount(@Nullable java.lang.String TeacherStudentCount) {
        this.mTeacherStudentCount = TeacherStudentCount;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.teacherStudentCount);
        super.requestRebind();
    }
    public void setClazz(@Nullable com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails Clazz) {
        this.mClazz = Clazz;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.clazz);
        super.requestRebind();
    }
    public void setClazzCodeVisible(boolean ClazzCodeVisible) {
        this.mClazzCodeVisible = ClazzCodeVisible;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.clazzCodeVisible);
        super.requestRebind();
    }
    public void setFragmentEventHandler(@Nullable com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener FragmentEventHandler) {
        this.mFragmentEventHandler = FragmentEventHandler;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.fragmentEventHandler);
        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 clazzClazzEndTime = 0;
        java.lang.String clazzClazzHolidayCalendarUmCalendarName = null;
        java.lang.String teacherStudentCount = mTeacherStudentCount;
        int clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE = 0;
        com.ustadmobile.lib.db.entities.School clazzClazzSchool = null;
        long clazzClazzSchoolUid = 0;
        long clazzClazzStartTime = 0;
        com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails clazz = mClazz;
        int clazzClazzHolidayCalendarJavaLangObjectNullViewVISIBLEViewGONE = 0;
        int clazzClazzSchoolUidInt0ViewVISIBLEViewGONE = 0;
        boolean clazzCodeVisible = mClazzCodeVisible;
        boolean clazzExtKtIsStartOrEndTimeSetClazz = false;
        boolean clazzClazzSchoolUidInt0 = false;
        java.lang.String clazzClazzSchoolSchoolName = null;
        java.lang.String clazzClazzDesc = null;
        int clazzCodeVisibleViewVISIBLEViewGONE = 0;
        com.ustadmobile.lib.db.entities.HolidayCalendar clazzClazzHolidayCalendar = null;
        com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener fragmentEventHandler = mFragmentEventHandler;
        java.lang.String clazzClazzCode = null;
        boolean clazzClazzHolidayCalendarJavaLangObjectNull = false;

        if ((dirtyFlags & 0x11L) != 0) {
        }
        if ((dirtyFlags & 0x12L) != 0) {



                if (clazz != null) {
                    // read clazz.clazzEndTime
                    clazzClazzEndTime = clazz.getClazzEndTime();
                    // read clazz.clazzSchool
                    clazzClazzSchool = clazz.getClazzSchool();
                    // read clazz.clazzSchoolUid
                    clazzClazzSchoolUid = clazz.getClazzSchoolUid();
                    // read clazz.clazzStartTime
                    clazzClazzStartTime = clazz.getClazzStartTime();
                    // read clazz.clazzDesc
                    clazzClazzDesc = clazz.getClazzDesc();
                    // read clazz.clazzHolidayCalendar
                    clazzClazzHolidayCalendar = clazz.getClazzHolidayCalendar();
                    // read clazz.clazzCode
                    clazzClazzCode = clazz.getClazzCode();
                }
                // read ClazzExtKt.isStartOrEndTimeSet(clazz)
                clazzExtKtIsStartOrEndTimeSetClazz = com.ustadmobile.core.util.ext.ClazzExtKt.isStartOrEndTimeSet(clazz);
            if((dirtyFlags & 0x12L) != 0) {
                if(clazzExtKtIsStartOrEndTimeSetClazz) {
                        dirtyFlags |= 0x40L;
                }
                else {
                        dirtyFlags |= 0x20L;
                }
            }


                if (clazzClazzSchool != null) {
                    // read clazz.clazzSchool.schoolName
                    clazzClazzSchoolSchoolName = clazzClazzSchool.getSchoolName();
                }
                // read clazz.clazzSchoolUid != 0
                clazzClazzSchoolUidInt0 = (clazzClazzSchoolUid) != (0);
                // read clazz.clazzHolidayCalendar != null
                clazzClazzHolidayCalendarJavaLangObjectNull = (clazzClazzHolidayCalendar) != (null);
                // read ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
                clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE = ((clazzExtKtIsStartOrEndTimeSetClazz) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
            if((dirtyFlags & 0x12L) != 0) {
                if(clazzClazzSchoolUidInt0) {
                        dirtyFlags |= 0x400L;
                }
                else {
                        dirtyFlags |= 0x200L;
                }
            }
            if((dirtyFlags & 0x12L) != 0) {
                if(clazzClazzHolidayCalendarJavaLangObjectNull) {
                        dirtyFlags |= 0x100L;
                }
                else {
                        dirtyFlags |= 0x80L;
                }
            }
                if (clazzClazzHolidayCalendar != null) {
                    // read clazz.clazzHolidayCalendar.umCalendarName
                    clazzClazzHolidayCalendarUmCalendarName = clazzClazzHolidayCalendar.getUmCalendarName();
                }


                // read clazz.clazzSchoolUid != 0 ? View.VISIBLE : View.GONE
                clazzClazzSchoolUidInt0ViewVISIBLEViewGONE = ((clazzClazzSchoolUidInt0) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
                // read clazz.clazzHolidayCalendar != null ? View.VISIBLE : View.GONE
                clazzClazzHolidayCalendarJavaLangObjectNullViewVISIBLEViewGONE = ((clazzClazzHolidayCalendarJavaLangObjectNull) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        if ((dirtyFlags & 0x14L) != 0) {

            if((dirtyFlags & 0x14L) != 0) {
                if(clazzCodeVisible) {
                        dirtyFlags |= 0x1000L;
                }
                else {
                        dirtyFlags |= 0x800L;
                }
            }


                // read clazzCodeVisible ? View.VISIBLE : View.GONE
                clazzCodeVisibleViewVISIBLEViewGONE = ((clazzCodeVisible) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        // batch finished
        if ((dirtyFlags & 0x10L) != 0) {
            // api target 1

            this.fragmentClazzDetailClasscodeLayout.setOnClickListener(mCallback53);
        }
        if ((dirtyFlags & 0x14L) != 0) {
            // api target 1

            this.fragmentClazzDetailClasscodeLayout.setVisibility(clazzCodeVisibleViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x12L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailClazzcodeText, clazzClazzCode);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setTextFromToDateTimeMillis(this.fragmentClazzDetailOverviewDaterangeText, clazzClazzStartTime, clazzClazzEndTime);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewDescriptionText, clazzClazzDesc);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewHolidaycalendarText, clazzClazzHolidayCalendarUmCalendarName);
            this.fragmentClazzDetailOverviewSchoolLinlayout.setVisibility(clazzClazzSchoolUidInt0ViewVISIBLEViewGONE);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewSchoolNameText, clazzClazzSchoolSchoolName);
            this.fragmentClazzStartEndDateLinearlayout.setVisibility(clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE);
            this.fragmentClazzStartHolidaycalendarLinearlayout.setVisibility(clazzClazzHolidayCalendarJavaLangObjectNullViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x11L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewNumMembers, teacherStudentCount);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        // localize variables for thread safety
        // fragmentEventHandler
        com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener fragmentEventHandler = mFragmentEventHandler;
        // clazz != null
        boolean clazzJavaLangObjectNull = false;
        // clazz
        com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails clazz = mClazz;
        // clazz.clazzCode
        java.lang.String clazzClazzCode = null;
        // fragmentEventHandler != null
        boolean fragmentEventHandlerJavaLangObjectNull = false;



        fragmentEventHandlerJavaLangObjectNull = (fragmentEventHandler) != (null);
        if (fragmentEventHandlerJavaLangObjectNull) {



            clazzJavaLangObjectNull = (clazz) != (null);
            if (clazzJavaLangObjectNull) {


                clazzClazzCode = clazz.getClazzCode();

                fragmentEventHandler.onClickClassCode(clazzClazzCode);
            }
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): teacherStudentCount
        flag 1 (0x2L): clazz
        flag 2 (0x3L): clazzCodeVisible
        flag 3 (0x4L): fragmentEventHandler
        flag 4 (0x5L): null
        flag 5 (0x6L): ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
        flag 6 (0x7L): ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
        flag 7 (0x8L): clazz.clazzHolidayCalendar != null ? View.VISIBLE : View.GONE
        flag 8 (0x9L): clazz.clazzHolidayCalendar != null ? View.VISIBLE : View.GONE
        flag 9 (0xaL): clazz.clazzSchoolUid != 0 ? View.VISIBLE : View.GONE
        flag 10 (0xbL): clazz.clazzSchoolUid != 0 ? View.VISIBLE : View.GONE
        flag 11 (0xcL): clazzCodeVisible ? View.VISIBLE : View.GONE
        flag 12 (0xdL): clazzCodeVisible ? View.VISIBLE : View.GONE
    flag mapping end*/
    //end
}