UNPKG

@zywave/zywave-api-toolkit-bundle

Version:

2 lines (1 loc) 433 B
class t{#t;#e;#o;constructor(t,e=null){this.#t=t,this.#e=e,this.#o=[]}show(t,e,o,i){const r=document.createElement("zui-notifier");r.type=t,r.message=o,r.header=e,r.parentSelector=this.#e,null!=i&&(r.duration=i),r.addEventListener("close",(()=>{this.#o=this.#o.filter((t=>t!==r)),this.#t.removeChild(r)})),this.#t.appendChild(r),r.show(),this.#o.push(r)}reposition(){for(const t of this.#o)t.show()}}export{t as NotifierController};