App.MenuItemComponent = Ember.Component.extend
  classNames: 'menu-list-item'
  classNameBindings: ['active']
  click: ->
    if route_param = @get('route_param')
      @get('targetObject').transitionToRoute(@get('route'), route_param)
    else
      @get('targetObject').transitionToRoute(@get('route'))
  active: (->
    if @get('targetObject.currentPath') == @get('route') then 'active' else ''
  ).property('targetObject.currentPath')
  setTemplate: (-> @layoutName = "components/menu/#{@get('route')}").on('init')
