 {CompositeDisposable} = require 'atom'
 {addToolTips, suppressEvent} = require './utils'
-
 
 # This is NOT Panel in Atom's terminology, Just naming.
 module.exports =

          else
            element.textContent = states.searchTerm
            invalid = states.searchTerm.length isnt 0

          element.classList.toggle('invalid', invalid)
        when 'refresh'
          element.classList.toggle('running', value)
        else
          element.classList.toggle('selected', value)

  addToolTips: ->
    tooltips =
      autoPreview: "narrow-ui:toggle-auto-preview"
      protected: "narrow-ui:protect"
      refresh: "narrow:refresh"
      selectFiles: "narrow-ui:select-files"
      searchWholeWord: "narrow-ui:toggle-search-whole-word"
      searchIgnoreCase: "narrow-ui:toggle-search-ignore-case"
      searchUseRegex: "narrow-ui:toggle-search-use-regex"

    disposables = new CompositeDisposable
    keyBindingTarget = @editorElement
    for elementName, commandName of tooltips when element = @elements[elementName]
      disposables.add(addToolTips({element, commandName, keyBindingTarget}))
    disposables

    @marker = @editor.markBufferPosition([0, 0])
    @editor.decorateMarker(@marker, type: 'block', item: @container, position: 'before')

    unless @toolTipDisposables?
      @toolTipDisposables = new CompositeDisposable
      for toolTipsSpec in @toolTipsSpecs
        @toolTipDisposables.add(addToolTips(toolTipsSpec))

  updateElements: (states) ->
    for elementName, value of states when element = @elements[elementName]
