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 FragmentDiscussionTopicEditBindingImpl extends FragmentDiscussionTopicEditBinding  {

    @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_course_discussion_course_block_edit_cl, 4);
        sViewsWithIds.put(R.id.fragment_course_discussion_course_block_edit_desc_til, 5);
    }
    // views
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener fragmentCourseDiscussionCourseBlockEditDescTietandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of discussionTopic.discussionTopicDesc
            //         is discussionTopic.setDiscussionTopicDesc((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(fragmentCourseDiscussionCourseBlockEditDescTiet);
            // localize variables for thread safety
            // discussionTopic.discussionTopicDesc
            java.lang.String discussionTopicDiscussionTopicDesc = null;
            // discussionTopic != null
            boolean discussionTopicJavaLangObjectNull = false;
            // discussionTopic
            com.ustadmobile.lib.db.entities.DiscussionTopic discussionTopic = mDiscussionTopic;



            discussionTopicJavaLangObjectNull = (discussionTopic) != (null);
            if (discussionTopicJavaLangObjectNull) {




                discussionTopic.setDiscussionTopicDesc(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener fragmentCourseDiscussionCourseBlockEditTitleTietandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of discussionTopic.discussionTopicTitle
            //         is discussionTopic.setDiscussionTopicTitle((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(fragmentCourseDiscussionCourseBlockEditTitleTiet);
            // localize variables for thread safety
            // discussionTopic != null
            boolean discussionTopicJavaLangObjectNull = false;
            // discussionTopic
            com.ustadmobile.lib.db.entities.DiscussionTopic discussionTopic = mDiscussionTopic;
            // discussionTopic.discussionTopicTitle
            java.lang.String discussionTopicDiscussionTopicTitle = null;



            discussionTopicJavaLangObjectNull = (discussionTopic) != (null);
            if (discussionTopicJavaLangObjectNull) {




                discussionTopic.setDiscussionTopicTitle(((java.lang.String) (callbackArg_0)));
            }
        }
    };

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

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x8L;
        }
        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.fieldsEnabled == variableId) {
            setFieldsEnabled((boolean) variable);
        }
        else if (BR.discussionTopic == variableId) {
            setDiscussionTopic((com.ustadmobile.lib.db.entities.DiscussionTopic) variable);
        }
        else if (BR.blockTitleError == variableId) {
            setBlockTitleError((java.lang.String) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setFieldsEnabled(boolean FieldsEnabled) {
        this.mFieldsEnabled = FieldsEnabled;
    }
    public void setDiscussionTopic(@Nullable com.ustadmobile.lib.db.entities.DiscussionTopic DiscussionTopic) {
        this.mDiscussionTopic = DiscussionTopic;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.discussionTopic);
        super.requestRebind();
    }
    public void setBlockTitleError(@Nullable java.lang.String BlockTitleError) {
        this.mBlockTitleError = BlockTitleError;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.blockTitleError);
        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 discussionTopicDiscussionTopicDesc = null;
        com.ustadmobile.lib.db.entities.DiscussionTopic discussionTopic = mDiscussionTopic;
        java.lang.String discussionTopicDiscussionTopicTitle = null;
        java.lang.String blockTitleError = mBlockTitleError;

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



                if (discussionTopic != null) {
                    // read discussionTopic.discussionTopicDesc
                    discussionTopicDiscussionTopicDesc = discussionTopic.getDiscussionTopicDesc();
                    // read discussionTopic.discussionTopicTitle
                    discussionTopicDiscussionTopicTitle = discussionTopic.getDiscussionTopicTitle();
                }
        }
        if ((dirtyFlags & 0xcL) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0xaL) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentCourseDiscussionCourseBlockEditDescTiet, discussionTopicDiscussionTopicDesc);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentCourseDiscussionCourseBlockEditTitleTiet, discussionTopicDiscussionTopicTitle);
        }
        if ((dirtyFlags & 0x8L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.fragmentCourseDiscussionCourseBlockEditDescTiet, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, fragmentCourseDiscussionCourseBlockEditDescTietandroidTextAttrChanged);
            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.fragmentCourseDiscussionCourseBlockEditTitleTiet, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, fragmentCourseDiscussionCourseBlockEditTitleTietandroidTextAttrChanged);
        }
        if ((dirtyFlags & 0xcL) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextInputLayoutBindingsKt.setErrorText(this.fragmentCourseDiscussionCourseBlockEditTitleTil, blockTitleError);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): fieldsEnabled
        flag 1 (0x2L): discussionTopic
        flag 2 (0x3L): blockTitleError
        flag 3 (0x4L): null
    flag mapping end*/
    //end
}