import{r as m,j as x,T as S}from"./popup-DV3T-VlG.js";var T=(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(y=>r[y]||y):n;h?(o.classList.remove(...v),o.classList.add(r&&r[e]?r[e]:e)):o.setAttribute(l,e)}),f(e)}function f(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{}},b=m.createContext(void 0),w={setTheme:t=>{},themes:[]},E=()=>{var t;return(t=m.useContext(b))!=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:`(${T.toString()})(${c})`}})});const j=({...t})=>{const{theme:s="system"}=E();return x.jsx(S,{theme:s,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};export{j as T};
