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 ItemCommentNewSendBindingImpl extends ItemCommentNewSendBinding  {

    @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
    private androidx.databinding.InverseBindingListener itemCommentNewCommentEtandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of comment
            //         is com.toughra.ustadmobile.databinding.ItemCommentNewSendBindingImpl.this.setComment(callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(itemCommentNewCommentEt);
            // localize variables for thread safety
            // comment
            java.lang.String comment = mComment;


            if ((com.toughra.ustadmobile.databinding.ItemCommentNewSendBindingImpl.this) != (null)) {



                com.toughra.ustadmobile.databinding.ItemCommentNewSendBindingImpl.this.setComment(callbackArg_0);
            }
        }
    };

    public ItemCommentNewSendBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds));
    }
    private ItemCommentNewSendBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (android.widget.EditText) bindings[2]
            , (de.hdodenhof.circleimageview.CircleImageView) bindings[1]
            , (android.widget.ImageButton) bindings[3]
            );
        this.itemCommentNewCommentEt.setTag(null);
        this.itemCommentNewPersonIcon.setTag(null);
        this.itemCommentNewSendIb.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 = 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.personUid == variableId) {
            setPersonUid((java.lang.Long) variable);
        }
        else if (BR.sheet == variableId) {
            setSheet((com.ustadmobile.port.android.view.CommentsBottomSheet) variable);
        }
        else if (BR.comment == variableId) {
            setComment((java.lang.String) variable);
        }
        else if (BR.listener == variableId) {
            setListener((com.ustadmobile.core.controller.NewCommentItemListener) variable);
        }
        else if (BR.hintText == variableId) {
            setHintText((java.lang.String) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setPersonUid(@Nullable java.lang.Long PersonUid) {
        this.mPersonUid = PersonUid;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.personUid);
        super.requestRebind();
    }
    public void setSheet(@Nullable com.ustadmobile.port.android.view.CommentsBottomSheet Sheet) {
        this.mSheet = Sheet;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.sheet);
        super.requestRebind();
    }
    public void setComment(@Nullable java.lang.String Comment) {
        this.mComment = Comment;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.comment);
        super.requestRebind();
    }
    public void setListener(@Nullable com.ustadmobile.core.controller.NewCommentItemListener Listener) {
        this.mListener = Listener;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.listener);
        super.requestRebind();
    }
    public void setHintText(@Nullable java.lang.String HintText) {
        this.mHintText = HintText;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.hintText);
        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;
        }
        java.lang.Long personUid = mPersonUid;
        com.ustadmobile.port.android.view.util.ForeignKeyAttachmentUriAdapter personDetailFragmentFOREIGNKEYADAPTERPERSON = null;
        com.ustadmobile.port.android.view.CommentsBottomSheet sheet = mSheet;
        java.lang.String comment = mComment;
        com.ustadmobile.core.controller.NewCommentItemListener listener = mListener;
        long androidxDatabindingViewDataBindingSafeUnboxPersonUid = 0;
        java.lang.String hintText = mHintText;

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



                // read androidx.databinding.ViewDataBinding.safeUnbox(personUid)
                androidxDatabindingViewDataBindingSafeUnboxPersonUid = androidx.databinding.ViewDataBinding.safeUnbox(personUid);
        }
        if ((dirtyFlags & 0x20L) != 0) {

                // read PersonDetailFragment.FOREIGNKEYADAPTER_PERSON
                personDetailFragmentFOREIGNKEYADAPTERPERSON = com.ustadmobile.port.android.view.PersonDetailFragment.getFOREIGNKEYADAPTER_PERSON();
        }
        if ((dirtyFlags & 0x2eL) != 0) {
        }
        if ((dirtyFlags & 0x30L) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0x30L) != 0) {
            // api target 1

            this.itemCommentNewCommentEt.setHint(hintText);
        }
        if ((dirtyFlags & 0x24L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemCommentNewCommentEt, comment);
        }
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.itemCommentNewCommentEt, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, itemCommentNewCommentEtandroidTextAttrChanged);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKeyAdapter(this.itemCommentNewPersonIcon, personDetailFragmentFOREIGNKEYADAPTERPERSON);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.imageForeignKeyPlaceholder(this.itemCommentNewPersonIcon, androidx.appcompat.content.res.AppCompatResources.getDrawable(itemCommentNewPersonIcon.getContext(), R.drawable.ic_person_black_24dp));
        }
        if ((dirtyFlags & 0x21L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageForeignKey(this.itemCommentNewPersonIcon, androidxDatabindingViewDataBindingSafeUnboxPersonUid, (java.lang.String)null);
        }
        if ((dirtyFlags & 0x2eL) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageButtonBindingsKt.setEditButtonClick(this.itemCommentNewSendIb, listener, sheet, comment);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): personUid
        flag 1 (0x2L): sheet
        flag 2 (0x3L): comment
        flag 3 (0x4L): listener
        flag 4 (0x5L): hintText
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}