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 ItemCommetsListBindingImpl extends ItemCommetsListBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = null;
    }
    // views
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemCommetsListBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 5, sIncludes, sViewsWithIds));
    }
    private ItemCommetsListBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
            , (android.widget.TextView) bindings[3]
            , (android.widget.TextView) bindings[4]
            , (de.hdodenhof.circleimageview.CircleImageView) bindings[1]
            , (android.widget.TextView) bindings[2]
            );
        this.itemCommentsListCl.setTag(null);
        this.itemCommentsListLine2Text.setTag(null);
        this.itemCommentsListLine3Text.setTag(null);
        this.itemCommentsListNewitemicon.setTag(null);
        this.itemCommentsListText.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.commentwithperson == variableId) {
            setCommentwithperson((com.ustadmobile.lib.db.entities.CommentsWithPerson) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setCommentwithperson(@Nullable com.ustadmobile.lib.db.entities.CommentsWithPerson Commentwithperson) {
        this.mCommentwithperson = Commentwithperson;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.commentwithperson);
        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;
        }
        long commentwithpersonCommentsDateTimeAdded = 0;
        com.ustadmobile.lib.db.entities.Person commentwithpersonCommentsPerson = null;
        java.lang.String commentwithpersonCommentsText = null;
        com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter personDetailFragmentFOREIGNKEYADAPTERPERSON = null;
        java.lang.String commentwithpersonCommentsPersonFullName = null;
        com.ustadmobile.lib.db.entities.CommentsWithPerson commentwithperson = mCommentwithperson;
        long commentwithpersonCommentsPersonPersonUid = 0;

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

                // read PersonDetailFragment.FOREIGNKEYADAPTER_PERSON
                personDetailFragmentFOREIGNKEYADAPTERPERSON = com.ustadmobile.port.android.view.PersonDetailFragment.getFOREIGNKEYADAPTER_PERSON();
        }
        if ((dirtyFlags & 0x3L) != 0) {



                if (commentwithperson != null) {
                    // read commentwithperson.commentsDateTimeAdded
                    commentwithpersonCommentsDateTimeAdded = commentwithperson.getCommentsDateTimeAdded();
                    // read commentwithperson.commentsPerson
                    commentwithpersonCommentsPerson = commentwithperson.getCommentsPerson();
                    // read commentwithperson.commentsText
                    commentwithpersonCommentsText = commentwithperson.getCommentsText();
                }


                if (commentwithpersonCommentsPerson != null) {
                    // read commentwithperson.commentsPerson.fullName()
                    commentwithpersonCommentsPersonFullName = commentwithpersonCommentsPerson.fullName();
                    // read commentwithperson.commentsPerson.personUid
                    commentwithpersonCommentsPersonPersonUid = commentwithpersonCommentsPerson.getPersonUid();
                }
        }
        // batch finished
        if ((dirtyFlags & 0x3L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemCommentsListLine2Text, commentwithpersonCommentsText);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setDateWithRelativeTime(this.itemCommentsListLine3Text, commentwithpersonCommentsDateTimeAdded);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKey(this.itemCommentsListNewitemicon, commentwithpersonCommentsPersonPersonUid, (java.lang.String)null);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemCommentsListText, commentwithpersonCommentsPersonFullName);
        }
        if ((dirtyFlags & 0x2L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKeyAdapter(this.itemCommentsListNewitemicon, personDetailFragmentFOREIGNKEYADAPTERPERSON);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.imageForeignKeyPlaceholder(this.itemCommentsListNewitemicon, androidx.appcompat.content.res.AppCompatResources.getDrawable(itemCommentsListNewitemicon.getContext(), R.drawable.ic_account_circle_black_24dp));
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): commentwithperson
        flag 1 (0x2L): null
    flag mapping end*/
    //end
}