define(["ember","mm","text!./login-assistant-tmpl.hbs"],function(a,b,c){return a.Component.extend({tagName:"div",layout:a.Handlebars.compile(c),models:[],visible:function(){var a=this.get("models.length")&&(this.get("focused")||this.get("inside")&&this.get("expend"));return this.set("expend",a),a}.property("focused","inside","models.length"),domReady:function(){var c=this;b.request(null,{action:"getAll",module:"userManager"}).then(function(b){c.set("models",[].concat(b.map(function(b){return a.Object.create(b)})))})}.on("didInsertElement"),save:function(){var c,d=this,e=d.get("models");c=e.find(function(a){return a.get("name")==d.get("username")}),c=c||a.Object.create(),c.set("name",d.get("username")),c.set("password",d.get("password")),b.post(JSON.parse(JSON.stringify(c)),{action:"put",module:"userManager"})}.observes("confirm"),focusIn:function(){this.set("focused",!0)},focusOut:function(){this.set("focused",!1)},mouseEnter:function(){this.set("inside",!0)},mouseLeave:function(){this.set("inside",!1)},actions:{clean:function(a){this.models.removeObject(a),b.post(a.id,{action:"remove",module:"userManager"})},select:function(a){this.set("username",a.name),this.set("password",a.password),this.set("focused",!1),this.set("inside",!1)}}})});