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