(()=>{function t(t,e){var n=this;_.assign(n,{icon:function(){return e.icon(n.state)},toggle:function(){n.state=!n.state,n.state&&n.onStart&&n.onStart();!n.state&&n.onStop&&n.onStop()}}),t.$watch(function(){return n.getState?n.getState():void 0},function(t){_.isUndefined(t)||(n.state=t)})}t.$inject=["$scope","c8yRealtime"],angular.module("c8y.ui").component("c8yRealtimeSwitch",{bindings:{state:"=?",getState:"&?",onStart:"&?",onStop:"&?"},templateUrl:":::PLUGIN_PATH:::/ui/realtime/realtime-switch.html",controller:t,controllerAs:"vm"})})();