App.FlashMessageComponent = Ember.Component.extend
  layoutName: 'flash_message'
  classNames: ['flash-message']
  classNameBindings: ['message:active']
  message: Ember.computed.alias 'globals.flash_message'
  click: -> @set 'globals.flash_message', ''
  inactivator: (->
    if @get('message')
      Ember.run.later((=> @set 'globals.flash_message', ''), 4000)
  ).observes('message')
