import{b as m,j as x}from"./app-CyJEXGyv.js";import{T as b}from"./index-BtT9Eyya.js";var S=(t,s,i,a,n,r,d,u)=>{let o=document.documentElement,p=["light","dark"];function c(e){(Array.isArray(t)?t:[t]).forEach(l=>{let h=l==="class",v=h&&r?n.map(f=>r[f]||f):n;h?(o.classList.remove(...v),o.classList.add(r&&r[e]?r[e]:e)):o.setAttribute(l,e)}),y(e)}function y(e){u&&p.includes(e)&&(o.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)c(a);else try{let e=localStorage.getItem(s)||i,l=d&&e==="system"?g():e;c(l)}catch{}},T=m.createContext(void 0),w={setTheme:t=>{},themes:[]},E=()=>{var t;return(t=m.useContext(T))!=null?t:w};m.memo(({forcedTheme:t,storageKey:s,attribute:i,enableSystem:a,enableColorScheme:n,defaultTheme:r,value:d,themes:u,nonce:o,scriptProps:p})=>{let c=JSON.stringify([i,s,r,t,u,d,a,n]).slice(1,-1);return m.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?o:"",dangerouslySetInnerHTML:{__html:`(${S.toString()})(${c})`}})});const A=({...t})=>{const{theme:s="system"}=E();return x.jsx(b,{theme:s,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};export{A as T};
