import{r as u,c as T,j as l}from"./app-BiexncSX.js";import{T as b}from"./index-BphRgCCf.js";import{L as S}from"./loader-circle-C36m3ppM.js";import{O as j,T as C,I as N,C as w}from"./triangle-alert-Dp60wOMH.js";var z=(t,e,a,i,m,s,n,c)=>{let o=document.documentElement,f=["light","dark"];function d(r){(Array.isArray(t)?t:[t]).forEach(p=>{let h=p==="class",v=h&&s?m.map(g=>s[g]||g):m;h?(o.classList.remove(...v),o.classList.add(s&&s[r]?s[r]:r)):o.setAttribute(p,r)}),x(r)}function x(r){c&&f.includes(r)&&(o.style.colorScheme=r)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let r=localStorage.getItem(e)||a,p=n&&r==="system"?y():r;d(p)}catch{}},E=u.createContext(void 0),k={setTheme:t=>{},themes:[]},L=()=>{var t;return(t=u.useContext(E))!=null?t:k};u.memo(({forcedTheme:t,storageKey:e,attribute:a,enableSystem:i,enableColorScheme:m,defaultTheme:s,value:n,themes:c,nonce:o,scriptProps:f})=>{let d=JSON.stringify([a,e,s,t,c,n,i,m]).slice(1,-1);return u.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?o:"",dangerouslySetInnerHTML:{__html:`(${z.toString()})(${d})`}})});const M=t=>{const e=T.c(7);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];const{theme:i}=L(),s=i===void 0?"system":i;let n,c;e[2]===Symbol.for("react.memo_cache_sentinel")?(n={success:l.jsx(w,{className:"size-4"}),info:l.jsx(N,{className:"size-4"}),warning:l.jsx(C,{className:"size-4"}),error:l.jsx(j,{className:"size-4"}),loading:l.jsx(S,{className:"size-4 animate-spin"})},c={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},e[2]=n,e[3]=c):(n=e[2],c=e[3]);let o;return e[4]!==a||e[5]!==s?(o=l.jsx(b,{theme:s,className:"toaster group",icons:n,style:c,...a}),e[4]=a,e[5]=s,e[6]=o):o=e[6],o};export{M as T};
