(()=>{function n(n,t){var i={hasPermissions:function(){return n.isAllowed({anyRole:["ROLE_SMARTRULE_READ","ROLE_SMARTRULE_ADMIN","ROLE_CEP_MANAGEMENT_ADMIN"]})},isApplicationAvailable:function(){return t.isAvailable(function(n){var t="MICROSERVICE"===n.type,i=!_.isUndefined(n.contextPath),a="smartrule"===n.contextPath;return t&&(i?a:"smartrule"===n.name)})},shouldShowGlobalSmartRules:function(){return i.shouldShowLocalSmartRules().then(function(n){return n&&i.hasPermissions()})},shouldShowLocalSmartRules:function(){return i.isApplicationAvailable()}};return i}n.$inject=["c8yPermissions","c8yApplication"],angular.module("c8y.ui").factory("c8ySmartRulesAvailability",n)})();