define(["ember","app","rm"],function(a,b,c){return b.LoginRoute=a.Route.extend({model:function(b){var d={},e=!1;"transmode"==b.action&&(this.get("session.online")?this.get("session.appUser.Token")?(e=!0,this.transitionTo(b.dest)):(d.username=this.get("session.appUser.Name"),d.password=""):(e=!0,this.transitionTo(b.dest)));var f=[];return e||f.addObject(c.getProfiles()),a.RSVP.Promise.all(f).then(function(b){return console.log(b),e||(d.localUsers=[].concat(b[0]).map(function(b){return console.log(b),a.Object.create(b)}).filter(function(a){return 0!=a.get("subFolders.length")})),d})},setupController:function(a,c){var d=this;a.set("model",c),a.get("tabs").setEach("display",!0),b.version.get("client.option.readonly")&&b.version.get("client.option.offline")?(d.set("session.ISO",!0),a.get("tabs.firstObject").set("display",!1),a.set("activeTab",a.get("tabs").objectAt(1))):(!a.get("activeTab")||c.username)&&a.set("activeTab",a.get("tabs").objectAt(0))}})});