System.register(["./p-553ce846.system.js","./p-36840de4.system.js","./p-90924752.system.js"],(function(t){"use strict";var i,e,n;return{setters:[function(t){i=t.a},function(t){e=t.L},function(t){n=t.T}],execute:function(){var o=4;var s=function(){function t(t,e){if(t===void 0){t=null}if(e===void 0){e=null}this.topContainer=t;this.bottomContainer=e;this.topContainer=i("top");this.bottomContainer=i("bottom")}t.prototype.call=function(t){if(typeof t==="string"){this.prepareNotification({message:t})}else{this.prepareNotification(t)}};t.prototype.calculateItemsByPosition=function(t){if(this.topContainer&&t==="top"){var i=this.topContainer.childElementCount;this.topContainer.classList.remove("more-odd","more-even");i>1&&this.topContainer.classList.add("more-odd");i>2&&this.topContainer.classList.add("more-even")}if(this.bottomContainer&&t==="bottom"){var i=this.bottomContainer.childElementCount;this.bottomContainer.classList.remove("more-odd","more-even");i>1&&this.bottomContainer.classList.add("more-odd");i>2&&this.bottomContainer.classList.add("more-even")}};t.prototype.shouldQueue=function(t){if(!this.topContainer&&t.position==="top"){this.topContainer=i("top");this.topContainer.addEventListener("slotchange",(function(){return console.log("change")}))}if(!this.bottomContainer&&t.position==="bottom"){this.bottomContainer=i("bottom")}return(t.position==="bottom"?this.bottomContainer:this.topContainer).childElementCount>=(n.isMobile()?1:o)};t.prototype.prepareNotification=function(t){var i=this;var e;if(this.shouldQueue(t)){setTimeout((function(){return i.prepareNotification(t)}),250)}else{var n=document.createElement("x-notification");if(t.label){var o=document.createElement("h4");o.innerText=t.label;n.appendChild(o)}if(t.onclose){n.addEventListener("close",t.onclose)}var s=document.createElement("p");s.innerHTML=t.message;n.appendChild(s);t.color&&n.setAttribute("color",t.color);t.icon&&n.setAttribute("icon",t.icon);t.interval&&n.setAttribute("interval",t.interval.toString());(t.position==="bottom"?this.bottomContainer:this.topContainer).insertAdjacentElement("afterbegin",n);this.calculateItemsByPosition((e=t.position)!==null&&e!==void 0?e:"top")}};t.prototype.success=function(t,i,n,o){this.prepareNotification({color:"success",label:i||e("alert.success"),message:t,icon:n,interval:o})};t.prototype.fail=function(t,i,n,o){this.prepareNotification({color:"danger",label:i||e("alert.danger"),message:t,icon:n,interval:o})};t.create=function(){var i=new t;return Object.assign((function(t){return i.call(t)}),{success:function(t,e,n,o){return i.success(t,e,n,o)},fail:function(t,e,n,o){return i.fail(t,e,n,o)}})};return t}();var r=t("N",s.create())}}}));