(()=>{function c(t,e){var o=this;t.$watch("app()",function(c){i=c,a=["icon","class"];var n,i,a=(c=>c?c.replace(/fa-/gi,"dlt-c8y-icon-"):"")(_.get(i,a)||_.get(i,["manifest"].concat(a)))||(n=c,i=_.find(_.keys(e),function(c){return n&&n.contextPath&&-1<n.contextPath.indexOf(c)}),(i=e[i])?"c8y-icon-".concat(i):void 0);o.showIcon=!!a,o.iconClass=["c8y-icon",a,t.white()?"c8y-icon-white":"c8y-icon-duocolor"].filter(Boolean),o.appNameAbbr=c&&c.name&&c.name.substr(0,2)})}c.$inject=["$scope","c8yAppIconsList"],angular.module("c8y.ui").value("c8yAppIconsList",{analyticsbuilder:"analytics-builder","analytics-builder":"analytics-builder",cockpit:"cockpit",devicemanagement:"device-management",administration:"administration",apamaepl:"apama-epl"}).directive("c8yAppIcon",function(){return{restrict:"E",scope:{app:"&",white:"&"},controller:c,controllerAs:"ctrl",template:['<i ng-if="ctrl.showIcon" ng-class="ctrl.iconClass"></i>','<span ng-if="!ctrl.showIcon" class="app-noicon" ng-bind="ctrl.appNameAbbr"></span>'].join("")}})})();