App.MenuProductComponent = Ember.Component.extend
  tagName: 'li'
  classNameBindings: ['specific_id', 'product.active:active:inactive']
  specific_id: (-> "order-product-#{@get('product.id')}").property('product.id')
  orderProducts: false
  target: -> @get('parentView.targetObject')
  showDescriptionIcon: Ember.computed.or 'product.description', 'product.product_variants.length'

  actions:
    addProduct: (product)->
      if product.get('product_variants.length')
        @modal 'product_variant_select', model: product
      else
        product.addOrderItem()
    showProductDescription: (product)->
      @modal 'product_info', model: product, title: product.get('name')
