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 FragmentHolidayEditBindingImpl extends FragmentHolidayEditBinding  {

    @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, 4);
        sViewsWithIds.put(R.id.activity_holiday_edit_nametextinput, 5);
        sViewsWithIds.put(R.id.activity_holiday_edit_startdateinput, 6);
        sViewsWithIds.put(R.id.activity_holiday_edit_enddateinput, 7);
    }
    // views
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView1;
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView2;
    @NonNull
    private final com.google.android.material.textfield.TextInputEditText mboundView3;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener mboundView1androidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of holiday.holName
            //         is holiday.setHolName((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(mboundView1);
            // localize variables for thread safety
            // holiday
            com.ustadmobile.lib.db.entities.Holiday holiday = mHoliday;
            // holiday.holName
            java.lang.String holidayHolName = null;
            // holiday != null
            boolean holidayJavaLangObjectNull = false;



            holidayJavaLangObjectNull = (holiday) != (null);
            if (holidayJavaLangObjectNull) {




                holiday.setHolName(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener mboundView2dateTimeInMillisAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of holiday.holStartTime
            //         is holiday.setHolStartTime((long) callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.getDateTimeInMillis(mboundView2);
            // localize variables for thread safety
            // holiday
            com.ustadmobile.lib.db.entities.Holiday holiday = mHoliday;
            // holiday != null
            boolean holidayJavaLangObjectNull = false;
            // holiday.holStartTime
            long holidayHolStartTime = 0;



            holidayJavaLangObjectNull = (holiday) != (null);
            if (holidayJavaLangObjectNull) {




                holiday.setHolStartTime(((long) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener mboundView3dateTimeInMillisAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of holiday.holEndTime
            //         is holiday.setHolEndTime((long) callbackArg_0)
            long callbackArg_0 = com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.getDateTimeInMillis(mboundView3);
            // localize variables for thread safety
            // holiday
            com.ustadmobile.lib.db.entities.Holiday holiday = mHoliday;
            // holiday.holEndTime
            long holidayHolEndTime = 0;
            // holiday != null
            boolean holidayJavaLangObjectNull = false;



            holidayJavaLangObjectNull = (holiday) != (null);
            if (holidayJavaLangObjectNull) {




                holiday.setHolEndTime(((long) (callbackArg_0)));
            }
        }
    };

    public FragmentHolidayEditBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 8, sIncludes, sViewsWithIds));
    }
    private FragmentHolidayEditBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[4]
            , (com.google.android.material.textfield.TextInputLayout) bindings[7]
            , (com.google.android.material.textfield.TextInputLayout) bindings[5]
            , (androidx.core.widget.NestedScrollView) bindings[0]
            , (com.google.android.material.textfield.TextInputLayout) bindings[6]
            );
        this.activityHolidayEditScroll.setTag(null);
        this.mboundView1 = (com.google.android.material.textfield.TextInputEditText) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView2 = (com.google.android.material.textfield.TextInputEditText) bindings[2];
        this.mboundView2.setTag(null);
        this.mboundView3 = (com.google.android.material.textfield.TextInputEditText) bindings[3];
        this.mboundView3.setTag(null);
        setRootTag(root);
        // listeners
        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.holiday == variableId) {
            setHoliday((com.ustadmobile.lib.db.entities.Holiday) 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 {
            variableSet = false;
        }
            return variableSet;
    }

    public void setLoading(boolean Loading) {
        this.mLoading = Loading;
    }
    public void setHoliday(@Nullable com.ustadmobile.lib.db.entities.Holiday Holiday) {
        this.mHoliday = Holiday;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.holiday);
        super.requestRebind();
    }
    public void setFieldsEnabled(boolean FieldsEnabled) {
        this.mFieldsEnabled = FieldsEnabled;
    }
    public void setDateTimeMode(@Nullable java.lang.Integer DateTimeMode) {
        this.mDateTimeMode = DateTimeMode;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.dateTimeMode);
        super.requestRebind();
    }
    public void setTimeZoneId(@Nullable java.lang.String TimeZoneId) {
        this.mTimeZoneId = TimeZoneId;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.timeZoneId);
        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 holidayHolName = null;
        long holidayHolEndTime = 0;
        com.ustadmobile.lib.db.entities.Holiday holiday = mHoliday;
        int androidxDatabindingViewDataBindingSafeUnboxDateTimeMode = 0;
        java.lang.Integer dateTimeMode = mDateTimeMode;
        java.lang.String timeZoneId = mTimeZoneId;
        long holidayHolStartTime = 0;

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


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

                    if (holiday != null) {
                        // read holiday.holName
                        holidayHolName = holiday.getHolName();
                    }
            }

                if (holiday != null) {
                    // read holiday.holEndTime
                    holidayHolEndTime = holiday.getHolEndTime();
                    // read holiday.holStartTime
                    holidayHolStartTime = holiday.getHolStartTime();
                }
                // read androidx.databinding.ViewDataBinding.safeUnbox(dateTimeMode)
                androidxDatabindingViewDataBindingSafeUnboxDateTimeMode = androidx.databinding.ViewDataBinding.safeUnbox(dateTimeMode);
        }
        // batch finished
        if ((dirtyFlags & 0x22L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView1, holidayHolName);
        }
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.mboundView1, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, mboundView1androidTextAttrChanged);
            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.mboundView2, true);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTimeInMillisChanged(this.mboundView2, mboundView2dateTimeInMillisAttrChanged);
            com.ustadmobile.port.android.view.binding.EditTextBindingsKt.setRunOnClickWhenFocused(this.mboundView3, true);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTimeInMillisChanged(this.mboundView3, mboundView3dateTimeInMillisAttrChanged);
            // api target 3
            if(getBuildSdkInt() >= 3) {

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

            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTime2(this.mboundView2, holidayHolStartTime, timeZoneId, androidxDatabindingViewDataBindingSafeUnboxDateTimeMode);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateTime2(this.mboundView3, holidayHolEndTime, timeZoneId, androidxDatabindingViewDataBindingSafeUnboxDateTimeMode);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): loading
        flag 1 (0x2L): holiday
        flag 2 (0x3L): fieldsEnabled
        flag 3 (0x4L): dateTimeMode
        flag 4 (0x5L): timeZoneId
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}