package com.mastercoding.chatapp.databinding;
import com.mastercoding.chatapp.R;
import com.mastercoding.chatapp.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class RowChatBindingImpl extends RowChatBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = null;
    }
    // views
    @NonNull
    private final android.widget.LinearLayout mboundView0;
    @NonNull
    private final android.widget.LinearLayout mboundView1;
    @NonNull
    private final android.widget.TextView mboundView2;
    @NonNull
    private final android.widget.TextView mboundView3;
    @NonNull
    private final android.widget.LinearLayout mboundView4;
    @NonNull
    private final android.widget.TextView mboundView5;
    @NonNull
    private final android.widget.TextView mboundView6;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public RowChatBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 7, sIncludes, sViewsWithIds));
    }
    private RowChatBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            );
        this.mboundView0 = (android.widget.LinearLayout) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView1 = (android.widget.LinearLayout) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView2 = (android.widget.TextView) bindings[2];
        this.mboundView2.setTag(null);
        this.mboundView3 = (android.widget.TextView) bindings[3];
        this.mboundView3.setTag(null);
        this.mboundView4 = (android.widget.LinearLayout) bindings[4];
        this.mboundView4.setTag(null);
        this.mboundView5 = (android.widget.TextView) bindings[5];
        this.mboundView5.setTag(null);
        this.mboundView6 = (android.widget.TextView) bindings[6];
        this.mboundView6.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x2L;
        }
        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.chatMessage == variableId) {
            setChatMessage((com.mastercoding.chatapp.model.ChatMessage) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setChatMessage(@Nullable com.mastercoding.chatapp.model.ChatMessage ChatMessage) {
        this.mChatMessage = ChatMessage;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.chatMessage);
        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;
        }
        int chatMessageIsMineViewVISIBLEViewGONE = 0;
        java.lang.String chatMessageConvertTime = null;
        java.lang.String chatMessageText = null;
        com.mastercoding.chatapp.model.ChatMessage chatMessage = mChatMessage;
        boolean chatMessageIsMine = false;
        int chatMessageIsMineViewGONEViewVISIBLE = 0;

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



                if (chatMessage != null) {
                    // read chatMessage.convertTime()
                    chatMessageConvertTime = chatMessage.convertTime();
                    // read chatMessage.text
                    chatMessageText = chatMessage.getText();
                    // read chatMessage.isMine
                    chatMessageIsMine = chatMessage.isMine();
                }
            if((dirtyFlags & 0x3L) != 0) {
                if(chatMessageIsMine) {
                        dirtyFlags |= 0x8L;
                        dirtyFlags |= 0x20L;
                }
                else {
                        dirtyFlags |= 0x4L;
                        dirtyFlags |= 0x10L;
                }
            }


                // read chatMessage.isMine ? View.VISIBLE : View.GONE
                chatMessageIsMineViewVISIBLEViewGONE = ((chatMessageIsMine) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
                // read chatMessage.isMine ? View.GONE : View.VISIBLE
                chatMessageIsMineViewGONEViewVISIBLE = ((chatMessageIsMine) ? (android.view.View.GONE) : (android.view.View.VISIBLE));
        }
        // batch finished
        if ((dirtyFlags & 0x3L) != 0) {
            // api target 1

            this.mboundView1.setVisibility(chatMessageIsMineViewGONEViewVISIBLE);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView2, chatMessageText);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView3, chatMessageConvertTime);
            this.mboundView4.setVisibility(chatMessageIsMineViewVISIBLEViewGONE);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView5, chatMessageConvertTime);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView6, chatMessageText);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): chatMessage
        flag 1 (0x2L): null
        flag 2 (0x3L): chatMessage.isMine ? View.VISIBLE : View.GONE
        flag 3 (0x4L): chatMessage.isMine ? View.VISIBLE : View.GONE
        flag 4 (0x5L): chatMessage.isMine ? View.GONE : View.VISIBLE
        flag 5 (0x6L): chatMessage.isMine ? View.GONE : View.VISIBLE
    flag mapping end*/
    //end
}