define(["ember","mm"],function(a,b){return a.Component.extend({tagName:"div",layout:a.Handlebars.compile("{{model.state.text}}"),classNames:["fetch-state"],file:null,model:null,label:null,initialize:function(){"init"==this.get("model.state.state")&&this._addListener()}.on("init"),stateChanged:function(){"init"==this.get("model.state.state")&&this._addListener()}.observes("model.state.state"),_addListener:function(){var a=this,c=function(b,c){a.get("file")==c.url&&"terminal"==c.status&&a.set("model.state.state","fetched")};a.set("downloadHandle",c),b.listener.on("download",c)},willDestory:function(){this.get("downloadHandle")&&(b.listener.off("download",this.get("downloadHandle")),this.set("processHandle",null))}.on("willDestroyElement")})});