 Wheelmap.ToolbarController = Ember.Controller.extend
   needs: 'map'
   statusFilters: ['yes', 'limited', 'no', 'unknown']
-  map: Ember.computed.alias('controllers.map')
   _extraFilter: false # Flag for executing special status filter behavior only once
 
   init: ()->

        # Extra logic if all status filters are set and one is clicked: deactivate the other filters
        statusFilters.clear()
        statusFilters.addObject(wheelchair)
        @_extraFilter = true
      else
        if statusFilters.contains(wheelchair)
          statusFilters.removeObject(wheelchair)
        else
          statusFilters.addObject(wheelchair)

  statusFiltersDidChange: (()->
    $.cookie('last_status_filters', JSON.stringify(@get('statusFilters')))

  filterNodes: (()->
    self = @

    @get('controllers.map').forEach (node)->
      node.set('isVisible', self.get('statusFilters').contains(node.get('wheelchair')))
  ).observes('controllers.map.@each.wheelchair', 'statusFilters.@each')