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 FragmentClazzDetailOverviewBindingImpl extends FragmentClazzDetailOverviewBinding 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.activity_clazz_edit_edit_clx, 11);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_membersicon, 12);
        sViewsWithIds.put(R.id.fragment_clazz_detail_num_members_label, 13);
        sViewsWithIds.put(R.id.fragment_clazz_detail_join_icon, 14);
        sViewsWithIds.put(R.id.fragment_clazz_detail_clazzcode_label, 15);
        sViewsWithIds.put(R.id.clazzcode_bottom_barrier, 16);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_school_icon, 17);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_daterange_icon, 18);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_holidaycalendar_icon, 19);
        sViewsWithIds.put(R.id.textView37, 20);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_schedule_recyclerview, 21);
        sViewsWithIds.put(R.id.fragment_clazz_detail_overview_block_recyclerview, 22);
    }
    // views
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback133;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public FragmentClazzDetailOverviewBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 23, sIncludes, sViewsWithIds));
    }
    private FragmentClazzDetailOverviewBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[11]
            , (androidx.core.widget.NestedScrollView) bindings[0]
            , (androidx.constraintlayout.widget.Barrier) bindings[16]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[3]
            , (android.widget.TextView) bindings[15]
            , (android.widget.TextView) bindings[4]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[14]
            , (android.widget.TextView) bindings[13]
            , (androidx.recyclerview.widget.RecyclerView) bindings[22]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[18]
            , (android.widget.TextView) bindings[8]
            , (android.widget.TextView) bindings[1]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[19]
            , (android.widget.TextView) bindings[10]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[12]
            , (android.widget.TextView) bindings[2]
            , (androidx.recyclerview.widget.RecyclerView) bindings[21]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[17]
            , (android.widget.LinearLayout) bindings[5]
            , (android.widget.TextView) bindings[6]
            , (android.widget.LinearLayout) bindings[7]
            , (android.widget.LinearLayout) bindings[9]
            , (android.widget.TextView) bindings[20]
            );
        this.activityClazzEditScroll.setTag(null);
        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);
        setRootTag(root);
        // listeners
        mCallback133 = 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.loading == variableId) {
            setLoading((boolean) 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.fieldsEnabled == variableId) {
            setFieldsEnabled((boolean) variable);
        }
        else if (BR.fragmentEventHandler == variableId) {
            setFragmentEventHandler((com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setLoading(boolean Loading) {
        this.mLoading = Loading;
    }
    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 setFieldsEnabled(boolean FieldsEnabled) {
        this.mFieldsEnabled = FieldsEnabled;
    }
    public void setFragmentEventHandler(@Nullable com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener FragmentEventHandler) {
        this.mFragmentEventHandler = FragmentEventHandler;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        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;
        com.ustadmobile.lib.db.entities.School clazzClazzSchool = null;
        int clazzNumTeachers = 0;
        long clazzClazzSchoolUid = 0;
        long clazzClazzStartTime = 0;
        com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails clazz = mClazz;
        int clazzClazzHolidayCalendarJavaLangObjectNullViewVISIBLEViewGONE = 0;
        boolean clazzCodeVisible = mClazzCodeVisible;
        java.lang.String clazzClazzSchoolSchoolName = null;
        com.ustadmobile.lib.db.entities.HolidayCalendar clazzClazzHolidayCalendar = null;
        java.lang.String clazzClazzCode = null;
        boolean clazzClazzHolidayCalendarJavaLangObjectNull = false;
        int clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE = 0;
        java.lang.String fragmentClazzDetailOverviewNumMembersAndroidStringXTeachersYStudentsClazzNumTeachersClazzNumStudents = null;
        int clazzClazzSchoolUidInt0ViewVISIBLEViewGONE = 0;
        boolean clazzExtKtIsStartOrEndTimeSetClazz = false;
        boolean clazzClazzSchoolUidInt0 = false;
        java.lang.String clazzClazzDesc = null;
        int clazzNumStudents = 0;
        int clazzCodeVisibleViewVISIBLEViewGONE = 0;
        com.ustadmobile.port.android.view.ClazzDetailOverviewEventListener fragmentEventHandler = mFragmentEventHandler;

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



                if (clazz != null) {
                    // read clazz.clazzEndTime
                    clazzClazzEndTime = clazz.getClazzEndTime();
                    // read clazz.clazzSchool
                    clazzClazzSchool = clazz.getClazzSchool();
                    // read clazz.numTeachers
                    clazzNumTeachers = clazz.getNumTeachers();
                    // read clazz.clazzSchoolUid
                    clazzClazzSchoolUid = clazz.getClazzSchoolUid();
                    // read clazz.clazzStartTime
                    clazzClazzStartTime = clazz.getClazzStartTime();
                    // read clazz.clazzHolidayCalendar
                    clazzClazzHolidayCalendar = clazz.getClazzHolidayCalendar();
                    // read clazz.clazzCode
                    clazzClazzCode = clazz.getClazzCode();
                    // read clazz.clazzDesc
                    clazzClazzDesc = clazz.getClazzDesc();
                    // read clazz.numStudents
                    clazzNumStudents = clazz.getNumStudents();
                }
                // read ClazzExtKt.isStartOrEndTimeSet(clazz)
                clazzExtKtIsStartOrEndTimeSetClazz = com.ustadmobile.core.util.ext.ClazzExtKt.isStartOrEndTimeSet(clazz);
            if((dirtyFlags & 0x22L) != 0) {
                if(clazzExtKtIsStartOrEndTimeSetClazz) {
                        dirtyFlags |= 0x200L;
                }
                else {
                        dirtyFlags |= 0x100L;
                }
            }


                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 @android:string/x_teachers_y_students
                fragmentClazzDetailOverviewNumMembersAndroidStringXTeachersYStudentsClazzNumTeachersClazzNumStudents = fragmentClazzDetailOverviewNumMembers.getResources().getString(R.string.x_teachers_y_students, clazzNumTeachers, clazzNumStudents);
                // read ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
                clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE = ((clazzExtKtIsStartOrEndTimeSetClazz) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
            if((dirtyFlags & 0x22L) != 0) {
                if(clazzClazzSchoolUidInt0) {
                        dirtyFlags |= 0x800L;
                }
                else {
                        dirtyFlags |= 0x400L;
                }
            }
            if((dirtyFlags & 0x22L) != 0) {
                if(clazzClazzHolidayCalendarJavaLangObjectNull) {
                        dirtyFlags |= 0x80L;
                }
                else {
                        dirtyFlags |= 0x40L;
                }
            }
                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 & 0x24L) != 0) {

            if((dirtyFlags & 0x24L) != 0) {
                if(clazzCodeVisible) {
                        dirtyFlags |= 0x2000L;
                }
                else {
                        dirtyFlags |= 0x1000L;
                }
            }


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

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

            this.fragmentClazzDetailClasscodeLayout.setVisibility(clazzCodeVisibleViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x22L) != 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);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewNumMembers, fragmentClazzDetailOverviewNumMembersAndroidStringXTeachersYStudentsClazzNumTeachersClazzNumStudents);
            this.fragmentClazzDetailOverviewSchoolLinlayout.setVisibility(clazzClazzSchoolUidInt0ViewVISIBLEViewGONE);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentClazzDetailOverviewSchoolNameText, clazzClazzSchoolSchoolName);
            this.fragmentClazzStartEndDateLinearlayout.setVisibility(clazzExtKtIsStartOrEndTimeSetClazzViewVISIBLEViewGONE);
            this.fragmentClazzStartHolidaycalendarLinearlayout.setVisibility(clazzClazzHolidayCalendarJavaLangObjectNullViewVISIBLEViewGONE);
        }
    }
    // 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): loading
        flag 1 (0x2L): clazz
        flag 2 (0x3L): clazzCodeVisible
        flag 3 (0x4L): fieldsEnabled
        flag 4 (0x5L): fragmentEventHandler
        flag 5 (0x6L): null
        flag 6 (0x7L): clazz.clazzHolidayCalendar != null ? View.VISIBLE : View.GONE
        flag 7 (0x8L): clazz.clazzHolidayCalendar != null ? View.VISIBLE : View.GONE
        flag 8 (0x9L): ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
        flag 9 (0xaL): ClazzExtKt.isStartOrEndTimeSet(clazz) ? View.VISIBLE : View.GONE
        flag 10 (0xbL): clazz.clazzSchoolUid != 0 ? View.VISIBLE : View.GONE
        flag 11 (0xcL): clazz.clazzSchoolUid != 0 ? View.VISIBLE : View.GONE
        flag 12 (0xdL): clazzCodeVisible ? View.VISIBLE : View.GONE
        flag 13 (0xeL): clazzCodeVisible ? View.VISIBLE : View.GONE
    flag mapping end*/
    //end
}