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 FragmentContentEntryAddOptionsBindingImpl extends FragmentContentEntryAddOptionsBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = new android.util.SparseIntArray();
        sViewsWithIds.put(R.id.content_add_link, 2);
        sViewsWithIds.put(R.id.add_using_link_icon, 3);
        sViewsWithIds.put(R.id.add_using_link_title, 4);
        sViewsWithIds.put(R.id.content_add_gallery, 5);
        sViewsWithIds.put(R.id.add_gallery_icon, 6);
        sViewsWithIds.put(R.id.add_gallery_title, 7);
        sViewsWithIds.put(R.id.content_add_file, 8);
        sViewsWithIds.put(R.id.add_file_icon, 9);
        sViewsWithIds.put(R.id.add_file_title, 10);
        sViewsWithIds.put(R.id.content_add_folder, 11);
        sViewsWithIds.put(R.id.add_folder_icon, 12);
        sViewsWithIds.put(R.id.add_folder_title, 13);
    }
    // views
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public FragmentContentEntryAddOptionsBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 14, sIncludes, sViewsWithIds));
    }
    private FragmentContentEntryAddOptionsBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.appcompat.widget.AppCompatImageView) bindings[9]
            , (android.widget.TextView) bindings[10]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[12]
            , (android.widget.TextView) bindings[13]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[6]
            , (android.widget.TextView) bindings[7]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[3]
            , (android.widget.TextView) bindings[4]
            , (android.widget.LinearLayout) bindings[0]
            , (android.widget.RelativeLayout) bindings[8]
            , (android.widget.RelativeLayout) bindings[11]
            , (android.widget.RelativeLayout) bindings[5]
            , (android.widget.RelativeLayout) bindings[2]
            , (android.widget.TextView) bindings[1]
            );
        this.bottomContentOptionSheet.setTag(null);
        this.contentCreateFolder.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.showFolder == variableId) {
            setShowFolder((boolean) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setShowFolder(boolean ShowFolder) {
        this.mShowFolder = ShowFolder;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.showFolder);
        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;
        }
        boolean showFolder = mShowFolder;
        int showFolderViewVISIBLEViewGONE = 0;

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

            if((dirtyFlags & 0x3L) != 0) {
                if(showFolder) {
                        dirtyFlags |= 0x8L;
                }
                else {
                        dirtyFlags |= 0x4L;
                }
            }


                // read showFolder ? View.VISIBLE : View.GONE
                showFolderViewVISIBLEViewGONE = ((showFolder) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        // batch finished
        if ((dirtyFlags & 0x3L) != 0) {
            // api target 1

            this.contentCreateFolder.setVisibility(showFolderViewVISIBLEViewGONE);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): showFolder
        flag 1 (0x2L): null
        flag 2 (0x3L): showFolder ? View.VISIBLE : View.GONE
        flag 3 (0x4L): showFolder ? View.VISIBLE : View.GONE
    flag mapping end*/
    //end
}