+underscore = require('underscore')
+
 # SMC libraries
 misc = require('smc-util/misc')
 {defaults, required} = misc

        return directories

    submit_selected: (path_list) ->
        @props.add_folders(path_list)
        @clear_add_search()

    clear_add_search: ->

        item_name        : 'result'

    getInitialState: ->
        selected_items : [] # currently selected options
        show_selector  : false

    shouldComponentUpdate: (newProps, newState) ->
        return newProps.search_results != @props.search_results or
            newProps.item_name != @props.item_name or
            newProps.is_searching != @props.is_searching or
            not underscore.isEqual(newState.selected_items, @state.selected_items)

    componentWillReceiveProps: (newProps) ->
        @setState
