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 ItemInviteWithLinkBindingImpl extends ItemInviteWithLinkBinding implements com.toughra.ustadmobile.generated.callback.OnClickListener.Listener {

    @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.item_invite_with_link_link_icon, 1);
        sViewsWithIds.put(R.id.item_comment_new_comment_et, 2);
    }
    // views
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback88;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemInviteWithLinkBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 3, sIncludes, sViewsWithIds));
    }
    private ItemInviteWithLinkBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
            , (android.widget.TextView) bindings[2]
            , (de.hdodenhof.circleimageview.CircleImageView) bindings[1]
            );
        this.itemCommentNewCl.setTag(null);
        setRootTag(root);
        // listeners
        mCallback88 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        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.entityName == variableId) {
            setEntityName((java.lang.String) variable);
        }
        else if (BR.tableId == variableId) {
            setTableId((java.lang.Integer) variable);
        }
        else if (BR.code == variableId) {
            setCode((java.lang.String) variable);
        }
        else if (BR.inviteHandler == variableId) {
            setInviteHandler((com.ustadmobile.port.android.view.InviteWithLinkHandler) variable);
        }
        else if (BR.mPresenter == variableId) {
            setMPresenter((com.ustadmobile.core.controller.PersonListPresenter) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setEntityName(@Nullable java.lang.String EntityName) {
        this.mEntityName = EntityName;
    }
    public void setTableId(@Nullable java.lang.Integer TableId) {
        this.mTableId = TableId;
    }
    public void setCode(@Nullable java.lang.String Code) {
        this.mCode = Code;
    }
    public void setInviteHandler(@Nullable com.ustadmobile.port.android.view.InviteWithLinkHandler InviteHandler) {
        this.mInviteHandler = InviteHandler;
    }
    public void setMPresenter(@Nullable com.ustadmobile.core.controller.PersonListPresenter MPresenter) {
        this.mMPresenter = MPresenter;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.mPresenter);
        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;
        }
        com.ustadmobile.core.controller.PersonListPresenter mPresenter = mMPresenter;
        // batch finished
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            this.itemCommentNewCl.setOnClickListener(mCallback88);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        // localize variables for thread safety
        // mPresenter != null
        boolean mPresenterJavaLangObjectNull = false;
        // mPresenter
        com.ustadmobile.core.controller.PersonListPresenter mPresenter = mMPresenter;



        mPresenterJavaLangObjectNull = (mPresenter) != (null);
        if (mPresenterJavaLangObjectNull) {


            mPresenter.handleClickInviteWithLink();
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): entityName
        flag 1 (0x2L): tableId
        flag 2 (0x3L): code
        flag 3 (0x4L): inviteHandler
        flag 4 (0x5L): mPresenter
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}