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 ItemLearnerGroupMemberListBindingImpl extends ItemLearnerGroupMemberListBinding  {

    @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 ItemLearnerGroupMemberListBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds));
    }
    private ItemLearnerGroupMemberListBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (de.hdodenhof.circleimageview.CircleImageView) bindings[1]
            , (android.widget.TextView) bindings[2]
            , (android.widget.TextView) bindings[3]
            );
        this.itemLearnergroupmemberIcon.setTag(null);
        this.itemLearnergroupmemberName.setTag(null);
        this.itemLearnergroupmemberRole.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 = 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.learnerGroupMember == variableId) {
            setLearnerGroupMember((com.ustadmobile.lib.db.entities.LearnerGroupMemberWithPerson) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setLearnerGroupMember(@Nullable com.ustadmobile.lib.db.entities.LearnerGroupMemberWithPerson LearnerGroupMember) {
        this.mLearnerGroupMember = LearnerGroupMember;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.learnerGroupMember);
        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.String learnerGroupMemberPersonFirstNames = null;
        com.ustadmobile.lib.db.entities.Person learnerGroupMemberPerson = null;
        com.ustadmobile.lib.db.entities.LearnerGroupMemberWithPerson learnerGroupMember = mLearnerGroupMember;
        java.lang.String learnerGroupMemberPersonLastName = null;
        long learnerGroupMemberLearnerGroupMemberPersonUid = 0;
        int learnerGroupMemberLearnerGroupMemberRole = 0;
        java.lang.String learnerGroupMemberPersonFirstNamesJavaLangString = null;
        java.util.Map<java.lang.Integer,java.lang.Integer> learnerGroupMemberConstantsROLEMESSAGEIDOPTIONS = null;
        java.lang.String learnerGroupMemberPersonFirstNamesJavaLangStringLearnerGroupMemberPersonLastName = null;

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



                if (learnerGroupMember != null) {
                    // read learnerGroupMember.person
                    learnerGroupMemberPerson = learnerGroupMember.getPerson();
                    // read learnerGroupMember.learnerGroupMemberPersonUid
                    learnerGroupMemberLearnerGroupMemberPersonUid = learnerGroupMember.getLearnerGroupMemberPersonUid();
                    // read learnerGroupMember.learnerGroupMemberRole
                    learnerGroupMemberLearnerGroupMemberRole = learnerGroupMember.getLearnerGroupMemberRole();
                }


                if (learnerGroupMemberPerson != null) {
                    // read learnerGroupMember.person.firstNames
                    learnerGroupMemberPersonFirstNames = learnerGroupMemberPerson.getFirstNames();
                    // read learnerGroupMember.person.lastName
                    learnerGroupMemberPersonLastName = learnerGroupMemberPerson.getLastName();
                }


                // read (learnerGroupMember.person.firstNames) + (" ")
                learnerGroupMemberPersonFirstNamesJavaLangString = (learnerGroupMemberPersonFirstNames) + (" ");


                // read ((learnerGroupMember.person.firstNames) + (" ")) + (learnerGroupMember.person.lastName)
                learnerGroupMemberPersonFirstNamesJavaLangStringLearnerGroupMemberPersonLastName = (learnerGroupMemberPersonFirstNamesJavaLangString) + (learnerGroupMemberPersonLastName);
        }
        if ((dirtyFlags & 0x2L) != 0) {

                // read LearnerGroupMemberConstants.ROLE_MESSAGE_ID_OPTIONS
                learnerGroupMemberConstantsROLEMESSAGEIDOPTIONS = com.ustadmobile.core.controller.LearnerGroupMemberConstants.getROLE_MESSAGE_ID_OPTIONS();
        }
        // batch finished
        if ((dirtyFlags & 0x3L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.PersonPictureBindingAdapterKt.setPersonPicture(this.itemLearnergroupmemberIcon, learnerGroupMemberLearnerGroupMemberPersonUid, (java.lang.Boolean)null);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemLearnergroupmemberName, learnerGroupMemberPersonFirstNamesJavaLangStringLearnerGroupMemberPersonLastName);
            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextMessageIdOptionSelected(this.itemLearnergroupmemberRole, learnerGroupMemberLearnerGroupMemberRole);
        }
        if ((dirtyFlags & 0x2L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextMessageIdOptions(this.itemLearnergroupmemberRole, learnerGroupMemberConstantsROLEMESSAGEIDOPTIONS, (java.lang.Integer)null, (java.lang.String)null);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): learnerGroupMember
        flag 1 (0x2L): null
    flag mapping end*/
    //end
}