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 ItemPresenterFieldRowViewDropdownBindingImpl extends ItemPresenterFieldRowViewDropdownBinding  {

    @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;
    @NonNull
    private final android.widget.TextView mboundView3;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemPresenterFieldRowViewDropdownBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds));
    }
    private ItemPresenterFieldRowViewDropdownBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.appcompat.widget.AppCompatImageView) bindings[1]
            , (android.widget.TextView) bindings[2]
            );
        this.itemPresenterFieldRowViewDropdownIcon.setTag(null);
        this.itemPresenterFieldRowViewTextValue.setTag(null);
        this.mboundView0 = (androidx.constraintlayout.widget.ConstraintLayout) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView3 = (android.widget.TextView) bindings[3];
        this.mboundView3.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x8L;
        }
        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.customField == variableId) {
            setCustomField((com.ustadmobile.lib.db.entities.CustomField) variable);
        }
        else if (BR.customFieldOptions == variableId) {
            setCustomFieldOptions((java.util.List<com.ustadmobile.lib.db.entities.CustomFieldValueOption>) variable);
        }
        else if (BR.customFieldValue == variableId) {
            setCustomFieldValue((com.ustadmobile.lib.db.entities.CustomFieldValue) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setCustomField(@Nullable com.ustadmobile.lib.db.entities.CustomField CustomField) {
        this.mCustomField = CustomField;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.customField);
        super.requestRebind();
    }
    public void setCustomFieldOptions(@Nullable java.util.List<com.ustadmobile.lib.db.entities.CustomFieldValueOption> CustomFieldOptions) {
        this.mCustomFieldOptions = CustomFieldOptions;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.customFieldOptions);
        super.requestRebind();
    }
    public void setCustomFieldValue(@Nullable com.ustadmobile.lib.db.entities.CustomFieldValue CustomFieldValue) {
        this.mCustomFieldValue = CustomFieldValue;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.customFieldValue);
        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.lib.db.entities.CustomField customField = mCustomField;
        int customFieldCustomFieldLabelMessageID = 0;
        java.util.List<com.ustadmobile.lib.db.entities.CustomFieldValueOption> customFieldOptions = mCustomFieldOptions;
        com.ustadmobile.lib.db.entities.CustomFieldValue customFieldValue = mCustomFieldValue;

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



                if (customField != null) {
                    // read customField.customFieldLabelMessageID
                    customFieldCustomFieldLabelMessageID = customField.getCustomFieldLabelMessageID();
                }
        }
        if ((dirtyFlags & 0xeL) != 0) {
        }
        // batch finished
        if ((dirtyFlags & 0x9L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setCustomFieldIcon(this.itemPresenterFieldRowViewDropdownIcon, customField);
            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextMessageId(this.mboundView3, customFieldCustomFieldLabelMessageID);
        }
        if ((dirtyFlags & 0xeL) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextFromCustomFieldDropDownOption(this.itemPresenterFieldRowViewTextValue, customFieldValue, customFieldOptions);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): customField
        flag 1 (0x2L): customFieldOptions
        flag 2 (0x3L): customFieldValue
        flag 3 (0x4L): null
    flag mapping end*/
    //end
}