System.register(["./p-36a31e0e.system.js","./p-bbed38ef.system.js","./p-dc274261.system.js"],(function(t){"use strict";var n,i,e,o,s;return{setters:[function(t){n=t.L},function(t){i=t.g},function(t){e=t.S;o=t.T;s=t.Q}],execute:function(){var r=4;var c=function(){function t(t,n){if(t===void 0){t=null}if(n===void 0){n=null}this.topContainer=t;this.bottomContainer=n;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.shouldQueue=function(t){if(!this.topContainer&&t.position==="top"){this.topContainer=i("top")}if(!this.bottomContainer&&t.position==="bottom"){this.bottomContainer=i("bottom")}return(t.position==="bottom"?this.bottomContainer:this.topContainer).childElementCount>=r};t.prototype.prepareNotification=function(t){var n=this;if(this.shouldQueue(t)){setTimeout((function(){return n.prepareNotification(t)}),250)}else{var i=document.createElement("x-notification");if(t.label){var e=document.createElement("h4");e.innerText=t.label;i.appendChild(e)}if(t.onclose){i.addEventListener("close",t.onclose)}var o=document.createElement("p");o.innerHTML=t.message;i.appendChild(o);t.color&&i.setAttribute("color",t.color);t.icon&&i.setAttribute("icon",t.icon);t.interval&&i.setAttribute("interval",t.interval.toString());(t.position==="bottom"?this.bottomContainer:this.topContainer).insertAdjacentElement("afterbegin",i)}};t.prototype.success=function(t,i,e,o){this.prepareNotification({color:"success",label:i||n("alert.success"),message:t,icon:e,interval:o})};t.prototype.fail=function(t,i,e,o){this.prepareNotification({color:"danger",label:i||n("alert.danger"),message:t,icon:e,interval:o})};t.create=function(){var n=new t;return Object.assign((function(t){return n.call(t)}),{success:function(t,i,e,o){return n.success(t,i,e,o)},fail:function(t,i,e,o){return n.fail(t,i,e,o)}})};return t}();var u=c.create();window.lang=n;window.notification=u;window.store=e;window.theme=o;window.query=s;var f={lang:n,notification:u,store:e,theme:o,query:s};var a=t("UI",f)}}}));