App.MenuItemProductOrdersComponent = Ember.Component.extend
  all_product_orders: Ember.computed -> @store.peekAll('product-order')
  product_orders: Ember.computed 'all_product_orders.[]', -> @get('all_product_orders').filterBy('isNew')
  layoutName: 'components/menu/product_orders'
  classNames: ['menu-list-item', 'menu-list-item-product-orders']
  classNameBindings: ['product_orders.length:show:hide', 'currentRoute:active']
  currentRoute: Ember.computed.equal 'targetObject.currentPath', 'product-orders'
  orderTotals: Ember.computed.mapBy 'product_orders', 'total'
  orderTotal: Ember.computed.sum 'orderTotals'
  #orderTotal: Ember.computed 'product_orders.@each.total', ->
  #  debugger
  click: ->
    @get('targetObject').transitionToRoute 'product-orders'
