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 ItemCourseImageBindingImpl extends ItemCourseImageBinding  {

    @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 androidx.constraintlayout.widget.ConstraintLayout mboundView0;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemCourseImageBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 2, sIncludes, sViewsWithIds));
    }
    private ItemCourseImageBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.appcompat.widget.AppCompatImageView) bindings[1]
            );
        this.fragmentCourseDetailPictureImageview.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 = 0x4L;
        }
        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.clazz == variableId) {
            setClazz((com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails) variable);
        }
        else if (BR.courseImageAdapter == variableId) {
            setCourseImageAdapter((com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setClazz(@Nullable com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails Clazz) {
        this.mClazz = Clazz;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.clazz);
        super.requestRebind();
    }
    public void setCourseImageAdapter(@Nullable com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter CourseImageAdapter) {
        this.mCourseImageAdapter = CourseImageAdapter;
    }

    @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.lib.db.entities.ClazzWithDisplayDetails clazz = mClazz;
        long clazzClazzUid = 0;
        com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter clazzListFragmentFOREIGNKEYADAPTERCOURSE = null;

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



                if (clazz != null) {
                    // read clazz.clazzUid
                    clazzClazzUid = clazz.getClazzUid();
                }
        }
        if ((dirtyFlags & 0x4L) != 0) {

                // read ClazzListFragment.FOREIGNKEYADAPTER_COURSE
                clazzListFragmentFOREIGNKEYADAPTERCOURSE = com.ustadmobile.port.android.view.ClazzListFragment.getFOREIGNKEYADAPTER_COURSE();
        }
        // batch finished
        if ((dirtyFlags & 0x4L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKeyAdapter(this.fragmentCourseDetailPictureImageview, clazzListFragmentFOREIGNKEYADAPTERCOURSE);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKeyAutoHide(this.fragmentCourseDetailPictureImageview, true);
        }
        if ((dirtyFlags & 0x5L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKey(this.fragmentCourseDetailPictureImageview, clazzClazzUid, (java.lang.String)null);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): clazz
        flag 1 (0x2L): courseImageAdapter
        flag 2 (0x3L): null
    flag mapping end*/
    //end
}