import{l as h,q as s,o,c,b as t,t as p,u as i,n as d,A as v,Q as _,J as g,i as l,j as w,F as x,r as f,a9 as b}from"./app-13978987.js";const k={class:"toast-message-container"},y=t("svg",{class:"icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[t("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1),B={class:"toast-message"},C=t("svg",{width:"16",height:"16","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),T=[C],L={__name:"Toastr",props:{item:[Object],index:[String,Number],duration:{type:Number,default:5e3}},setup(e){const a=e;return h(()=>setTimeout(()=>s.remove(a.index),a.duration)),(u,n)=>(o(),c("div",{class:d(["toastr",`toastr-${e.item.type}`])},[t("div",k,[y,t("span",B,p(e.item.message),1)]),t("button",{onClick:n[0]||(n[0]=r=>i(s).remove(e.index)),type:"button",class:"close"},T)],2))}},N={__name:"ToastrContainer",setup(e){const a=v(()=>_().props.toast);return g(()=>s.setSessionToast(a.value)),(u,n)=>(o(),l(b,{tag:"div",name:"right",class:d(["toastr-container",i(s).position])},{default:w(()=>[(o(!0),c(x,null,f(i(s).items,(r,m)=>(o(),l(L,{key:r.key,item:r,index:m},null,8,["item","index"]))),128))]),_:1},8,["class"]))}};export{N as default};
