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

System.register(["app/core/core_module"],function(a){function b(){return{restrict:"E",controller:e,bindToController:!0,controllerAs:"ctrl",template:d}}var c,d,e;return a("colorPicker",b),{setters:[function(a){c=a}],execute:function(){d='\n<div class="graph-legend-popover">\n  <div ng-show="ctrl.series" class="p-b-1">\n    <label>Y Axis:</label>\n    <button ng-click="ctrl.toggleAxis(yaxis);" class="btn btn-small"\n            ng-class="{\'btn-success\': ctrl.series.yaxis === 1,\n                       \'btn-inverse\': ctrl.series.yaxis === 2}">\n      Left\n    </button>\n    <button ng-click="ctrl.toggleAxis(yaxis);"\n      class="btn btn-small"\n      ng-class="{\'btn-success\': ctrl.series.yaxis === 2,\n                 \'btn-inverse\': ctrl.series.yaxis === 1}">\n      Right\n    </button>\n  </div>\n\n  <p class="m-b-0">\n   <i ng-repeat="color in ctrl.colors" class="pointer fa fa-circle"\n    ng-style="{color:color}"\n    ng-click="ctrl.colorSelected(color);">&nbsp;</i>\n  </p>\n</div>\n',e=function(){function a(a,b){this.$scope=a,this.$rootScope=b,this.colors=b.colors,this.autoClose=a.autoClose,this.series=a.series}return a.$inject=["$scope","$rootScope"],a.prototype.toggleAxis=function(a){this.$scope.toggleAxis(),this.$scope.autoClose&&this.$scope.dismiss()},a.prototype.colorSelected=function(a){this.$scope.colorSelected(a),this.$scope.autoClose&&this.$scope.dismiss()},a}(),a("ColorPickerCtrl",e),c["default"].directive("gfColorPicker",b)}}});