(()=>{function e(o){var i=this;function t(e){return(e.hasChildren||e.children().length)&&i.isRoot}_.assign(i,{$onInit:function(){i.node.device&&o.$on("c8yDeviceStatus:update",function(e,n){i.node.device.id===n.id&&(i.node.device=n)})},getIcon:function(e){var n=e.icon;!n&&t(e)&&(n="cog");return n},onNodeClick:function(e,n){_.set(n,"__lastClick",Date.now()),n.url()?(o.$broadcast("navigateByMenu"),n.expand()):(n.expandCollapse(),e.preventDefault());n.trigger("click")},onClickIcon:function(e,n){e.preventDefault(),e.stopPropagation(),n.expandCollapse()},isCollapsibleRoot:t,getNodeOrdered:function(){return i.isRoot?_.orderBy(i.node.children(),"priority","desc"):i.node.children()},showNode:function(e){return i.visibilityCheck?i.visibilityCheck(e):e.show}})}e.$inject=["$rootScope"],angular.module("c8y.ui").component("c8yUiNavigatorNode",{templateUrl:":::PLUGIN_PATH:::/ui/navigation/navigatorNode.html",controllerAs:"vm",controller:e,bindings:{node:"=",isRoot:"<",visibilityCheck:"<"}})})();