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 FragmentChatDetailBindingImpl extends FragmentChatDetailBinding  {

    @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_chat_detail_messages, 3);
    }
    // views
    @NonNull
    private final androidx.constraintlayout.widget.ConstraintLayout mboundView0;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener fragmentChatDetailMessageEtandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of comment
            //         is com.toughra.ustadmobile.databinding.FragmentChatDetailBindingImpl.this.setComment(callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(fragmentChatDetailMessageEt);
            // localize variables for thread safety
            // comment
            java.lang.String comment = mComment;


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



                com.toughra.ustadmobile.databinding.FragmentChatDetailBindingImpl.this.setComment(callbackArg_0);
            }
        }
    };

    public FragmentChatDetailBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds));
    }
    private FragmentChatDetailBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (android.widget.EditText) bindings[1]
            , (android.widget.ImageButton) bindings[2]
            , (androidx.recyclerview.widget.RecyclerView) bindings[3]
            );
        this.fragmentChatDetailMessageEt.setTag(null);
        this.fragmentChatDetailMessageSendIb.setTag(null);
        this.mboundView0 = (androidx.constraintlayout.widget.ConstraintLayout) bindings[0];
        this.mboundView0.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.chat == variableId) {
            setChat((com.ustadmobile.lib.db.entities.Chat) variable);
        }
        else if (BR.comment == variableId) {
            setComment((java.lang.String) variable);
        }
        else if (BR.listener == variableId) {
            setListener((com.ustadmobile.core.controller.NewCommentItemListener) variable);
        }
        else if (BR.personImageAdapter == variableId) {
            setPersonImageAdapter((com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter) variable);
        }
        else if (BR.loggedInPerson == variableId) {
            setLoggedInPerson((com.ustadmobile.lib.db.entities.Person) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setChat(@Nullable com.ustadmobile.lib.db.entities.Chat Chat) {
        this.mChat = Chat;
    }
    public void setComment(@Nullable java.lang.String Comment) {
        this.mComment = Comment;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.comment);
        super.requestRebind();
    }
    public void setListener(@Nullable com.ustadmobile.core.controller.NewCommentItemListener Listener) {
        this.mListener = Listener;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.listener);
        super.requestRebind();
    }
    public void setPersonImageAdapter(@Nullable com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter PersonImageAdapter) {
        this.mPersonImageAdapter = PersonImageAdapter;
    }
    public void setLoggedInPerson(@Nullable com.ustadmobile.lib.db.entities.Person LoggedInPerson) {
        this.mLoggedInPerson = LoggedInPerson;
    }

    @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 comment = mComment;
        com.ustadmobile.core.controller.NewCommentItemListener listener = mListener;

        if ((dirtyFlags & 0x26L) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0x22L) != 0) {
            // api target 1

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

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.fragmentChatDetailMessageEt, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, fragmentChatDetailMessageEtandroidTextAttrChanged);
        }
        if ((dirtyFlags & 0x26L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageButtonBindingsKt.setEditButtonClick2(this.fragmentChatDetailMessageSendIb, listener, comment);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): chat
        flag 1 (0x2L): comment
        flag 2 (0x3L): listener
        flag 3 (0x4L): personImageAdapter
        flag 4 (0x5L): loggedInPerson
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}