import{d as x,t as h,r as _,o as i,h as v,w as y,c as w,b as t,u as s,g as l,a,e as k,T as N}from"./index.DXvi0yH9.js";import{X as b}from"./x.ClCP0MsD.js";const B={key:0,class:"stwlite-tw-fixed stwlite-tw-top-10 stwlite-tw-right-5 stwlite-tw-w-80 stwlite-tw-rounded-lg stwlite-tw-bg-white stwlite-tw-shadow-lg stwlite-tw-ring-1 stwlite-tw-ring-black stwlite-tw-ring-opacity-5 stwlite-tw-overflow-hidden"},C={class:"stwlite-tw-p-4 stwlite-tw-flex stwlite-tw-items-start"},T={class:"stwlite-tw-flex-shrink-0"},M={key:0,class:"stwlite-tw-h-6 stwlite-tw-w-6 stwlite-tw-text-green-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},V={key:1,class:"stwlite-tw-h-6 stwlite-tw-w-6 stwlite-tw-text-red-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},j={class:"stwlite-tw-ml-3 stwlite-tw-w-0 stwlite-tw-flex-1 stwlite-tw-pt-0.5"},L={class:"stwlite-tw-text-sm stwlite-tw-font-medium stwlite-tw-text-gray-900 stwlite-tw-mt-0"},D={class:"stwlite-tw-mt-1 stwlite-tw-text-sm stwlite-tw-text-gray-500"},E={class:"stwlite-tw-ml-4 stwlite-tw-flex-shrink-0 stwlite-tw-flex"},X=x({__name:"Notification",props:{messageTitle:{},message:{},type:{},timeout:{default:5e3}},emits:["closeNotification"],setup(c,{emit:d}){const m=c,u=d,{message:p,type:o,messageTitle:f,timeout:g}=h(m),n=_(!0),r=()=>{n.value=!1,u("closeNotification")};return setTimeout(()=>{r()},g.value),(O,e)=>(i(),v(N,{enter:"stwlite-tw-transform stwlite-tw-ease-out stwlite-tw-duration-300 stwlite-tw-transition","enter-from":"stwlite-tw-translate-y-2 stwlite-tw-opacity-0 sm:stwlite-tw-translate-y-0 sm:stwlite-tw-translate-x-2","enter-to":"stwlite-tw-translate-y-0 stwlite-tw-opacity-100 sm:stwlite-tw-translate-x-0",leave:"stwlite-tw-transition stwlite-tw-ease-in stwlite-tw-duration-200","leave-from":"stwlite-tw-opacity-100","leave-to":"stwlite-tw-opacity-0"},{default:y(()=>[n.value?(i(),w("div",B,[t("div",C,[t("div",T,[s(o)==="success"?(i(),w("svg",M,e[0]||(e[0]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]))):l("",!0),s(o)==="error"?(i(),w("svg",V,e[1]||(e[1]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)]))):l("",!0)]),t("div",j,[t("p",L,a(s(f)),1),t("p",D,a(s(p)),1)]),t("div",E,[t("button",{class:"stwlite-tw-inline-flex stwlite-tw-text-gray-400 hover:stwlite-tw-text-gray-500 focus:stwlite-tw-outline-none stwlite-tw-bg-transparent stwlite-tw-border-0 stwlite-tw-cursor-pointer",onClick:r},[e[2]||(e[2]=t("span",{class:"stwlite-tw-sr-only"},null,-1)),k(s(b),{class:"stwlite-tw-w-4 stwlite-tw-h-4"})])])])])):l("",!0)]),_:1}))}});export{X as _};
