import{r as t,h as s,H as o,g as r}from"./p-add854e8.js";const i=class{constructor(s){t(this,s),this.position="top-right"}async addToast(t){var s;const o=document.createElement("rux-toast");o.style.transition="opacity 800ms ease-in 1s";for(const s in t)if(t.hasOwnProperty(s))switch(s){case"message":o.message=t[s];break;case"hideClose":o.hideClose=t[s];break;case"closeAfter":o.closeAfter=t[s]}null===(s=this.el)||void 0===s||s.insertBefore(o,this.el.firstChild)}get _toastsArray(){return Array.from(this.el.querySelectorAll("rux-toast"))}render(){return s(o,null,s("div",{class:"rux-toast-stack"},s("slot",null)))}get el(){return r(this)}};i.style=":host{position:fixed;z-index:100;max-width:100%;max-height:100%;margin:var(--spacing-3, 0.75rem);margin-block-start:var(--spacing-0, 0rem);overflow:hidden}:host([position=top-right]){top:0;right:0}:host([position=top-left]){top:0;left:0}:host([position=bottom-right]){bottom:0;right:0}:host([position=bottom-left]){bottom:0;left:0}";export{i as rux_toast_stack}