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 FragmentClazzLogEditBindingImpl extends FragmentClazzLogEditBinding  {

    @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_log_edit_edit_clx, 5);
    }
    // views
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView4;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener mboundView4timeValueAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of time
            //         is com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this.setTime(callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTimeValue(mboundView4);
            // localize variables for thread safety
            // time
            long time = mTime;


            if ((com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this) != (null)) {



                com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this.setTime(callbackArg_0);
            }
        }
    };
    private androidx.databinding.InverseBindingListener startDateTextdateTimeInMillisAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of date
            //         is com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this.setDate(callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.getDateTimeInMillis(startDateText);
            // localize variables for thread safety
            // date
            long date = mDate;


            if ((com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this) != (null)) {



                com.toughra.ustadmobile.databinding.FragmentClazzLogEditBindingImpl.this.setDate(callbackArg_0);
            }
        }
    };

    public FragmentClazzLogEditBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 6, sIncludes, sViewsWithIds));
    }
    private FragmentClazzLogEditBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (com.google.android.material.textfield.TextInputLayout) bindings[3]
            , (com.google.android.material.textfield.TextInputLayout) bindings[1]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[5]
            , (androidx.core.widget.NestedScrollView) bindings[0]
            , (com.google.android.material.textfield.TextInputEditText) bindings[2]
            );
        this.activityScheduleEditFromTextinputlayout.setTag(null);
        this.clazzLogEditDateTextinputlayout.setTag(null);
        this.fragmentClazzLogEditEditScroll.setTag(null);
        this.mboundView4 = (com.google.android.material.textfield.TextInputEditText) bindings[4];
        this.mboundView4.setTag(null);
        this.startDateText.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x200L;
        }
        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.dateError == variableId) {
            setDateError((java.lang.String) variable);
        }
        else if (BR.clazzLog == variableId) {
            setClazzLog((com.ustadmobile.lib.db.entities.ClazzLog) variable);
        }
        else if (BR.date == variableId) {
            setDate((long) variable);
        }
        else if (BR.activityEventHandler == variableId) {
            setActivityEventHandler((com.ustadmobile.port.android.view.ClazzLogEditFragmentEventHandler) variable);
        }
        else if (BR.fieldsEnabled == variableId) {
            setFieldsEnabled((boolean) variable);
        }
        else if (BR.dateTimeMode == variableId) {
            setDateTimeMode((java.lang.Integer) variable);
        }
        else if (BR.timeZoneId == variableId) {
            setTimeZoneId((java.lang.String) variable);
        }
        else if (BR.time == variableId) {
            setTime((long) variable);
        }
        else if (BR.timeError == variableId) {
            setTimeError((java.lang.String) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setDateError(@Nullable java.lang.String DateError) {
        this.mDateError = DateError;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.dateError);
        super.requestRebind();
    }
    public void setClazzLog(@Nullable com.ustadmobile.lib.db.entities.ClazzLog ClazzLog) {
        this.mClazzLog = ClazzLog;
    }
    public void setDate(long Date) {
        this.mDate = Date;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.date);
        super.requestRebind();
    }
    public void setActivityEventHandler(@Nullable com.ustadmobile.port.android.view.ClazzLogEditFragmentEventHandler ActivityEventHandler) {
        this.mActivityEventHandler = ActivityEventHandler;
    }
    public void setFieldsEnabled(boolean FieldsEnabled) {
        this.mFieldsEnabled = FieldsEnabled;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.fieldsEnabled);
        super.requestRebind();
    }
    public void setDateTimeMode(@Nullable java.lang.Integer DateTimeMode) {
        this.mDateTimeMode = DateTimeMode;
        synchronized(this) {
            mDirtyFlags |= 0x20L;
        }
        notifyPropertyChanged(BR.dateTimeMode);
        super.requestRebind();
    }
    public void setTimeZoneId(@Nullable java.lang.String TimeZoneId) {
        this.mTimeZoneId = TimeZoneId;
        synchronized(this) {
            mDirtyFlags |= 0x40L;
        }
        notifyPropertyChanged(BR.timeZoneId);
        super.requestRebind();
    }
    public void setTime(long Time) {
        this.mTime = Time;
        synchronized(this) {
            mDirtyFlags |= 0x80L;
        }
        notifyPropertyChanged(BR.time);
        super.requestRebind();
    }
    public void setTimeError(@Nullable java.lang.String TimeError) {
        this.mTimeError = TimeError;
        synchronized(this) {
            mDirtyFlags |= 0x100L;
        }
        notifyPropertyChanged(BR.timeError);
        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 dateError = mDateError;
        boolean timeErrorJavaLangObjectNull = false;
        long date = mDate;
        boolean dateErrorJavaLangObjectNull = false;
        int androidxDatabindingViewDataBindingSafeUnboxDateTimeMode = 0;
        boolean fieldsEnabled = mFieldsEnabled;
        java.lang.Integer dateTimeMode = mDateTimeMode;
        java.lang.String timeZoneId = mTimeZoneId;
        long time = mTime;
        java.lang.String timeError = mTimeError;

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



                // read dateError != null
                dateErrorJavaLangObjectNull = (dateError) != (null);
        }
        if ((dirtyFlags & 0x264L) != 0) {



                // read androidx.databinding.ViewDataBinding.safeUnbox(dateTimeMode)
                androidxDatabindingViewDataBindingSafeUnboxDateTimeMode = androidx.databinding.ViewDataBinding.safeUnbox(dateTimeMode);
        }
        if ((dirtyFlags & 0x210L) != 0) {
        }
        if ((dirtyFlags & 0x280L) != 0) {
        }
        if ((dirtyFlags & 0x300L) != 0) {



                // read timeError != null
                timeErrorJavaLangObjectNull = (timeError) != (null);
        }
        // batch finished
        if ((dirtyFlags & 0x300L) != 0) {
            // api target 1

            this.activityScheduleEditFromTextinputlayout.setError(timeError);
            this.activityScheduleEditFromTextinputlayout.setErrorEnabled(timeErrorJavaLangObjectNull);
        }
        if ((dirtyFlags & 0x210L) != 0) {
            // api target 1

            this.clazzLogEditDateTextinputlayout.setEnabled(fieldsEnabled);
        }
        if ((dirtyFlags & 0x201L) != 0) {
            // api target 1

            this.clazzLogEditDateTextinputlayout.setError(dateError);
            this.clazzLogEditDateTextinputlayout.setErrorEnabled(dateErrorJavaLangObjectNull);
        }
        if ((dirtyFlags & 0x200L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.mboundView4, true);
            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.getTime(this.mboundView4, mboundView4timeValueAttrChanged);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTimeInMillisChanged(this.startDateText, startDateTextdateTimeInMillisAttrChanged);
            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.startDateText, true);
            // api target 3
            if(getBuildSdkInt() >= 3) {

                this.startDateText.setInputType(android.text.InputType.TYPE_NULL);
            }
        }
        if ((dirtyFlags & 0x280L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TimePickerBindingAdapterKt.setTime(this.mboundView4, time);
        }
        if ((dirtyFlags & 0x264L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTime2(this.startDateText, date, timeZoneId, androidxDatabindingViewDataBindingSafeUnboxDateTimeMode);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): dateError
        flag 1 (0x2L): clazzLog
        flag 2 (0x3L): date
        flag 3 (0x4L): activityEventHandler
        flag 4 (0x5L): fieldsEnabled
        flag 5 (0x6L): dateTimeMode
        flag 6 (0x7L): timeZoneId
        flag 7 (0x8L): time
        flag 8 (0x9L): timeError
        flag 9 (0xaL): null
    flag mapping end*/
    //end
}