/*! grafana - v4.2.0 - 2017-03-24
 * Copyright (c) 2017 Torkel Ödegaard; Licensed Apache-2.0 */

System.register(["app/core/core_module","app/core/config","lodash"],function(a,b){"use strict";var c,d,e,f;b&&b.id;return{setters:[function(a){c=a},function(a){d=a},function(a){e=a}],execute:function(){f=function(){function a(a,b,c){this.$http=a,this.$routeParams=b,this.$location=c,this.colors=[],this.buttonNames=["primary","secondary","inverse","success","warning","danger"],this.buttonSizes=["btn-small","","btn-large"],this.buttonVariants=["-","-outline-"],this.pages=["colors","buttons"],this.theme=d.default.bootData.user.lightTheme?"light":"dark",this.page={},b.page?this.page[b.page]=1:this.page.colors=!0,this.page.colors&&this.loadColors()}return a.$inject=["$http","$routeParams","$location"],a.prototype.loadColors=function(){var a=this;this.$http.get("public/sass/styleguide.json").then(function(b){a.colors=e.default.map(b.data[a.theme],function(a,b){return{name:b,value:a}})})},a.prototype.switchTheme=function(){this.$routeParams.theme="dark"===this.theme?"light":"dark",this.$location.search(this.$routeParams),setTimeout(function(){window.location.href=window.location.href})},a}(),c.default.controller("StyleGuideCtrl",f)}}});