(()=>{function t(n,a,e){var i=!1;function l(t){t.onClose&&n.invoke(t.onClose),e.remove(t)}function r(t){return function(){i=!1,t&&t()}}_.assign(this,{detail:function(t){if(t.onDetail)return n.invoke(t.onDetail);var e=a.open({templateUrl:":::PLUGIN_PATH:::/ui/notifications/alertDetail.html",size:"lg",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",controller:["$scope","alert",function(t,e){t.alert=e,t.close=r(t.$dismiss),t.rawData=function(){e.detailedData&&(t.contents=$("<div/>").text(JSON.stringify(e.detailedData,null,"\t")).html(),t.mode="raw")},t.message=function(){t.contents=e.text,t.mode="msg"},t.isDanger=function(){return"danger"===t.alert.type},i=!0,t.isDanger()?t.message():t.rawData()}],resolve:{alert:function(){return t}}});return l(t),e.result.finally(r())},showDetail:function(t){return(t.detailedData||t.onDetail)&&!i},getClass:function(t){var e=[];"danger"!==t.type&&e.push("interact");return e.push("alert-".concat(t.type)),e.join(" ")},close:l,alerts:e.list()})}t.$inject=["$injector","$uibModal","c8yAlert"],angular.module("c8y.ui").component("c8yUiAlerts",{templateUrl:":::PLUGIN_PATH:::/ui/notifications/alerts.html",controllerAs:"vm",controller:t,bindings:{navHiddenOnStartup:"<"}})})();