/*! grafana - v3.1.0 - 2016-07-18
 * Copyright (c) 2016 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["app/core/config","lodash","app/core/core_module","app/core/store"],function(a){var b,c,d,e,f,g,h;return{setters:[function(a){b=a},function(a){c=a},function(a){d=a},function(a){e=a}],execute:function(){f=function(){function a(){b["default"].bootData.user&&c["default"].extend(this,b["default"].bootData.user)}return a}(),a("User",f),g=function(){function a(){this.pinned=e["default"].getBool("grafana.sidemenu.pinned",!1),this.pinned&&(this.sidemenu=!0),b["default"].buildInfo||(b["default"].buildInfo={}),b["default"].bootData||(b["default"].bootData={user:{},settings:{}}),this.version=b["default"].buildInfo.version,this.user=new f,this.isSignedIn=this.user.isSignedIn,this.isGrafanaAdmin=this.user.isGrafanaAdmin,this.isEditor=this.hasRole("Editor")||this.hasRole("Admin")}return a.prototype.hasRole=function(a){return this.user.orgRole===a},a.prototype.setPinnedState=function(a){this.pinned=a,e["default"].set("grafana.sidemenu.pinned",a)},a.prototype.toggleSideMenu=function(){this.sidemenu=!this.sidemenu,this.sidemenu||this.setPinnedState(!1)},a}(),a("ContextSrv",g),h=new g,a("contextSrv",h),d["default"].factory("contextSrv",function(){return h})}}});