import Ember from 'ember'
import config from 'ember-get-config'

export default Ember.Component.extend
  tagName: 'img'
  init: ->
    src = if config.environment is 'development' or config.environment is 'test'
      "#{config.rootURL}ember-panda/assets/#{@get('path')}"
    else
      "#{config.rootURL}assets/#{@get('path')}"
    @set 'full_src', src
    @_super arguments...
  attributeBindings: ['full_src:src']
