/*! 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,controllerAs:"ctrl",bindToController:!0,scope:{checked:"=",label:"@",labelClass:"@",tooltip:"@",switchClass:"@",onChange:"&"},template:d}}var c,d,e;return a("switchDirective",b),{setters:[function(a){c=a}],execute:function(){d='\n<label for="check-{{ctrl.id}}" class="gf-form-label {{ctrl.labelClass}} pointer">\n  {{ctrl.label}}\n  <info-popover mode="right-normal" ng-if="ctrl.tooltip">\n    {{ctrl.tooltip}}\n  </info-popover>\n</label>\n<div class="gf-form-switch {{ctrl.switchClass}}" ng-if="ctrl.show">\n  <input id="check-{{ctrl.id}}" type="checkbox" ng-model="ctrl.checked" ng-change="ctrl.internalOnChange()">\n  <label for="check-{{ctrl.id}}" data-on="Yes" data-off="No"></label>\n</div>\n',e=function(){function a(a,b){this.$timeout=b,this.show=!0,this.id=a.$id}return a.$inject=["$scope","$timeout"],a.prototype.internalOnChange=function(){var a=this;return this.$timeout(function(){return a.onChange()})},a}(),a("SwitchCtrl",e),c["default"].directive("gfFormSwitch",b)}}});