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 FragmentScheduleEditBindingImpl extends FragmentScheduleEditBinding  {

    @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, 6);
        sViewsWithIds.put(R.id.fragment_add_schedule_dialog_day_textinputlayout, 7);
    }
    // views
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView3;
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView5;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener fragmentAddScheduleDayTextselectedMessageIdOptionAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of schedule.scheduleDay
            //         is schedule.setScheduleDay((int) callbackArg_0)
            int callbackArg_0 = com.ustadmobile.port.android.view.binding.MessageIdAutoCompleteTextViewBindingsKt.getSelectedMessageIdOption(fragmentAddScheduleDayText);
            // localize variables for thread safety
            // schedule.scheduleDay
            int scheduleScheduleDay = 0;
            // schedule
            com.ustadmobile.lib.db.entities.Schedule schedule = mSchedule;
            // schedule != null
            boolean scheduleJavaLangObjectNull = false;



            scheduleJavaLangObjectNull = (schedule) != (null);
            if (scheduleJavaLangObjectNull) {




                schedule.setScheduleDay(((int) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener mboundView3timeValueAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of schedule.sceduleStartTime
            //         is schedule.setSceduleStartTime((long) callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTimeValue(mboundView3);
            // localize variables for thread safety
            // schedule.sceduleStartTime
            long scheduleSceduleStartTime = 0;
            // schedule
            com.ustadmobile.lib.db.entities.Schedule schedule = mSchedule;
            // schedule != null
            boolean scheduleJavaLangObjectNull = false;



            scheduleJavaLangObjectNull = (schedule) != (null);
            if (scheduleJavaLangObjectNull) {




                schedule.setSceduleStartTime(((long) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener mboundView5timeValueAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of schedule.scheduleEndTime
            //         is schedule.setScheduleEndTime((long) callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTimeValue(mboundView5);
            // localize variables for thread safety
            // schedule.scheduleEndTime
            long scheduleScheduleEndTime = 0;
            // schedule
            com.ustadmobile.lib.db.entities.Schedule schedule = mSchedule;
            // schedule != null
            boolean scheduleJavaLangObjectNull = false;



            scheduleJavaLangObjectNull = (schedule) != (null);
            if (scheduleJavaLangObjectNull) {




                schedule.setScheduleEndTime(((long) (callbackArg_0)));
            }
        }
    };

    public FragmentScheduleEditBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 8, sIncludes, sViewsWithIds));
    }
    private FragmentScheduleEditBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[6]
            , (com.google.android.material.textfield.TextInputLayout) bindings[2]
            , (androidx.core.widget.NestedScrollView) bindings[0]
            , (com.google.android.material.textfield.TextInputLayout) bindings[4]
            , (com.ustadmobile.port.android.view.IdOptionAutoCompleteTextView) bindings[1]
            , (com.google.android.material.textfield.TextInputLayout) bindings[7]
            );
        this.activityScheduleEditFromTextinputlayout.setTag(null);
        this.activityScheduleEditScroll.setTag(null);
        this.activityScheduleEditToTextinputlayout.setTag(null);
        this.fragmentAddScheduleDayText.setTag(null);
        this.mboundView3 = (com.google.android.material.textfield.TextInputEditText) bindings[3];
        this.mboundView3.setTag(null);
        this.mboundView5 = (com.google.android.material.textfield.TextInputEditText) bindings[5];
        this.mboundView5.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x40L;
        }
        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.fromTimeError == variableId) {
            setFromTimeError((java.lang.String) variable);
        }
        else if (BR.schedule == variableId) {
            setSchedule((com.ustadmobile.lib.db.entities.Schedule) variable);
        }
        else if (BR.toTimeError == variableId) {
            setToTimeError((java.lang.String) variable);
        }
        else if (BR.fieldsEnabled == variableId) {
            setFieldsEnabled((boolean) variable);
        }
        else if (BR.dayOptions == variableId) {
            setDayOptions((java.util.List<com.ustadmobile.core.util.IdOption>) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setLoading(boolean Loading) {
        this.mLoading = Loading;
    }
    public void setFromTimeError(@Nullable java.lang.String FromTimeError) {
        this.mFromTimeError = FromTimeError;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.fromTimeError);
        super.requestRebind();
    }
    public void setSchedule(@Nullable com.ustadmobile.lib.db.entities.Schedule Schedule) {
        this.mSchedule = Schedule;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.schedule);
        super.requestRebind();
    }
    public void setToTimeError(@Nullable java.lang.String ToTimeError) {
        this.mToTimeError = ToTimeError;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.toTimeError);
        super.requestRebind();
    }
    public void setFieldsEnabled(boolean FieldsEnabled) {
        this.mFieldsEnabled = FieldsEnabled;
    }
    public void setDayOptions(@Nullable java.util.List<com.ustadmobile.core.util.IdOption> DayOptions) {
        this.mDayOptions = DayOptions;
        synchronized(this) {
            mDirtyFlags |= 0x20L;
        }
        notifyPropertyChanged(BR.dayOptions);
        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;
        }
        java.lang.String fromTimeError = mFromTimeError;
        com.ustadmobile.lib.db.entities.Schedule schedule = mSchedule;
        java.lang.String toTimeError = mToTimeError;
        java.util.List<com.ustadmobile.core.util.IdOption> dayOptions = mDayOptions;
        int scheduleScheduleDay = 0;
        long scheduleSceduleStartTime = 0;
        long scheduleScheduleEndTime = 0;

        if ((dirtyFlags & 0x42L) != 0) {
        }
        if ((dirtyFlags & 0x64L) != 0) {



                if (schedule != null) {
                    // read schedule.scheduleDay
                    scheduleScheduleDay = schedule.getScheduleDay();
                }
            if ((dirtyFlags & 0x44L) != 0) {

                    if (schedule != null) {
                        // read schedule.sceduleStartTime
                        scheduleSceduleStartTime = schedule.getSceduleStartTime();
                        // read schedule.scheduleEndTime
                        scheduleScheduleEndTime = schedule.getScheduleEndTime();
                    }
            }
        }
        if ((dirtyFlags & 0x48L) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0x42L) != 0) {
            // api target 1

            this.activityScheduleEditFromTextinputlayout.setError(fromTimeError);
        }
        if ((dirtyFlags & 0x48L) != 0) {
            // api target 1

            this.activityScheduleEditToTextinputlayout.setError(toTimeError);
        }
        if ((dirtyFlags & 0x40L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.MessageIdAutoCompleteTextViewBindingsKt.setSelectedMessageIdListener(this.fragmentAddScheduleDayText, fragmentAddScheduleDayTextselectedMessageIdOptionAttrChanged);
            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.mboundView3, true);
            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTime(this.mboundView3, mboundView3timeValueAttrChanged);
            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.mboundView5, true);
            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTime(this.mboundView5, mboundView5timeValueAttrChanged);
        }
        if ((dirtyFlags & 0x64L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.MessageIdAutoCompleteTextViewBindingsKt.setMessageIdOptions(this.fragmentAddScheduleDayText, dayOptions, scheduleScheduleDay);
        }
        if ((dirtyFlags & 0x44L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.setTime(this.mboundView3, scheduleSceduleStartTime);
            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.setTime(this.mboundView5, scheduleScheduleEndTime);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): loading
        flag 1 (0x2L): fromTimeError
        flag 2 (0x3L): schedule
        flag 3 (0x4L): toTimeError
        flag 4 (0x5L): fieldsEnabled
        flag 5 (0x6L): dayOptions
        flag 6 (0x7L): null
    flag mapping end*/
    //end
}