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 FragmentDiscussionPostEditBindingImpl extends FragmentDiscussionPostEditBinding  {

    @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 discussionPost.discussionPostMessage
            //         is discussionPost.setDiscussionPostMessage((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(fragmentCourseDiscussionCourseBlockEditDescTiet);
            // localize variables for thread safety
            // discussionPost.discussionPostMessage
            java.lang.String discussionPostDiscussionPostMessage = null;
            // discussionPost != null
            boolean discussionPostJavaLangObjectNull = false;
            // discussionPost
            com.ustadmobile.lib.db.entities.DiscussionPost discussionPost = mDiscussionPost;



            discussionPostJavaLangObjectNull = (discussionPost) != (null);
            if (discussionPostJavaLangObjectNull) {




                discussionPost.setDiscussionPostMessage(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener fragmentCourseDiscussionCourseBlockEditTitleTietandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of discussionPost.discussionPostTitle
            //         is discussionPost.setDiscussionPostTitle((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(fragmentCourseDiscussionCourseBlockEditTitleTiet);
            // localize variables for thread safety
            // discussionPost.discussionPostTitle
            java.lang.String discussionPostDiscussionPostTitle = null;
            // discussionPost != null
            boolean discussionPostJavaLangObjectNull = false;
            // discussionPost
            com.ustadmobile.lib.db.entities.DiscussionPost discussionPost = mDiscussionPost;



            discussionPostJavaLangObjectNull = (discussionPost) != (null);
            if (discussionPostJavaLangObjectNull) {




                discussionPost.setDiscussionPostTitle(((java.lang.String) (callbackArg_0)));
            }
        }
    };

    public FragmentDiscussionPostEditBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 6, sIncludes, sViewsWithIds));
    }
    private FragmentDiscussionPostEditBindingImpl(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.discussionPost == variableId) {
            setDiscussionPost((com.ustadmobile.lib.db.entities.DiscussionPost) 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 setDiscussionPost(@Nullable com.ustadmobile.lib.db.entities.DiscussionPost DiscussionPost) {
        this.mDiscussionPost = DiscussionPost;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.discussionPost);
        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 discussionPostDiscussionPostMessage = null;
        java.lang.String discussionPostDiscussionPostTitle = null;
        com.ustadmobile.lib.db.entities.DiscussionPost discussionPost = mDiscussionPost;
        java.lang.String blockTitleError = mBlockTitleError;

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



                if (discussionPost != null) {
                    // read discussionPost.discussionPostMessage
                    discussionPostDiscussionPostMessage = discussionPost.getDiscussionPostMessage();
                    // read discussionPost.discussionPostTitle
                    discussionPostDiscussionPostTitle = discussionPost.getDiscussionPostTitle();
                }
        }
        if ((dirtyFlags & 0xcL) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0xaL) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentCourseDiscussionCourseBlockEditDescTiet, discussionPostDiscussionPostMessage);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.fragmentCourseDiscussionCourseBlockEditTitleTiet, discussionPostDiscussionPostTitle);
        }
        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): discussionPost
        flag 2 (0x3L): blockTitleError
        flag 3 (0x4L): null
    flag mapping end*/
    //end
}