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 ItemScopedGrantOneToManyListBindingImpl extends ItemScopedGrantOneToManyListBinding 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_scoped_grant_one_to_n_recycler, 2);
    }
    // views
    @NonNull
    private final androidx.appcompat.widget.LinearLayoutCompat mboundView0;
    @NonNull
    private final com.google.android.material.button.MaterialButton mboundView1;
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback92;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemScopedGrantOneToManyListBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 3, sIncludes, sViewsWithIds));
    }
    private ItemScopedGrantOneToManyListBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.recyclerview.widget.RecyclerView) bindings[2]
            );
        this.mboundView0 = (androidx.appcompat.widget.LinearLayoutCompat) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView1 = (com.google.android.material.button.MaterialButton) bindings[1];
        this.mboundView1.setTag(null);
        setRootTag(root);
        // listeners
        mCallback92 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        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.scopedGrantsOneToManyListener == variableId) {
            setScopedGrantsOneToManyListener((com.ustadmobile.core.util.OneToManyJoinEditListener<com.ustadmobile.lib.db.entities.ScopedGrantAndName>) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setScopedGrantsOneToManyListener(@Nullable com.ustadmobile.core.util.OneToManyJoinEditListener<com.ustadmobile.lib.db.entities.ScopedGrantAndName> ScopedGrantsOneToManyListener) {
        this.mScopedGrantsOneToManyListener = ScopedGrantsOneToManyListener;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.scopedGrantsOneToManyListener);
        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.util.OneToManyJoinEditListener<com.ustadmobile.lib.db.entities.ScopedGrantAndName> scopedGrantsOneToManyListener = mScopedGrantsOneToManyListener;
        // batch finished
        if ((dirtyFlags & 0x2L) != 0) {
            // api target 1

            this.mboundView1.setOnClickListener(mCallback92);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        // localize variables for thread safety
        // scopedGrantsOneToManyListener
        com.ustadmobile.core.util.OneToManyJoinEditListener<com.ustadmobile.lib.db.entities.ScopedGrantAndName> scopedGrantsOneToManyListener = mScopedGrantsOneToManyListener;
        // scopedGrantsOneToManyListener != null
        boolean scopedGrantsOneToManyListenerJavaLangObjectNull = false;



        scopedGrantsOneToManyListenerJavaLangObjectNull = (scopedGrantsOneToManyListener) != (null);
        if (scopedGrantsOneToManyListenerJavaLangObjectNull) {


            scopedGrantsOneToManyListener.onClickNew();
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): scopedGrantsOneToManyListener
        flag 1 (0x2L): null
    flag mapping end*/
    //end
}