App.SuppliersSwitcherComponent = Ember.Component.extend
  classNames: ['suppliers-switcher-container']
  suppliers: (-> @get('targetObject.store').peekAll 'supplier').property()
  other_suppliers: Ember.computed 'suppliers.[]',
    -> @get('suppliers').rejectBy 'id', @get('globals.current_supplier.id')
  actions:
    switchTo: (supplier)->
      window.location = Routes.switch_to_suppliers_supplier_path(supplier.get('id'))
