(()=>{function e(e,n){function t(){return e.subscriberId||e.$parent.$id}function i(){return e.channelName||e.$parent.realtimeChannel}_.assign(this,{icon:function(){var e=n.getStatus(t(),i());return _.isUndefined(e)?n.icon(!1):n.icon(e)},toggle:function(){n.switchRealtime(t(),i())}}),e.$on("$destroy",function(){n.destroySubscription(t(),i())})}e.$inject=["$scope","c8yRealtime"],angular.module("c8y.ui").directive("c8yRealtimeBtn",function(){return{replace:!0,templateUrl:":::PLUGIN_PATH:::/ui/views/realtimebtn.html",controller:e,controllerAs:"vm",scope:{subscriberId:"<",channelName:"<"}}})})();