define(["ember","app","mm"],function(a,b,c){var d=a.Object.extend({key:null,text:null,classN:null,classHB:null,classH:null}),e=[d.create({key:"growth",root:"growth",text:"成长档案",classN:"p1",display:!0}),d.create({key:"videos",root:"videos",text:"我的视频",classN:"p2",display:!0}),d.create({key:"albums",root:"albums",text:"我的照片",classN:"p3",display:!0}),d.create({key:"download",root:"download",text:"下载管理",classN:"p4",display:!0})];return b.NavigationController=a.ObjectController.extend({needs:["application"],online:a.computed.alias("session.online"),user:a.computed.alias("session.appUser"),appVersion:b.version,activeMenu:null,filteredMenus:function(){var a=this.get("activeMenu");return e.forEach(function(b){b.setProperties({classHB:a==b.root?"bg":"",classH:b.get("classN")+(a==b.root?"":"hov")})}),e}.property("activeMenu"),didOnlineChanged:function(){var a=this.get("activeMenu");"download"==a&&(a="growth"),this.transitionToRoute("login",{queryParams:{action:"transmode",dest:a}})}.observes("online"),actions:{redirect:function(a){this.transitionToRoute(a,{queryParams:{online:this.get("online")}})},switchOnline:function(a){this.set("session.online",!!a)},logout:function(){this.get("dialogManager").confirm("确定要退出？",{},{title:"提示",front:!0}).then(function(){c.post({},{module:"loader",action:"reload"})})}}})});