import{c as n}from"./button-D5r5edT8.js";import{r as o,j as u}from"./app-BGey7YPf.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],x=n("Moon",l);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],T=n("Sun",p),k={theme:"system",setTheme:()=>null},c=o.createContext(k);function f({children:t,defaultTheme:r="system",storageKey:a="vite-ui-theme",...m}){const[s,i]=o.useState(()=>localStorage.getItem(a)||r);o.useEffect(()=>{const e=window.document.documentElement;if(e.classList.add("no-transition"),e.classList.remove("light","dark"),s==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";e.classList.add(h)}else e.classList.add(s);setTimeout(()=>{e.classList.remove("no-transition")},0)},[s]);const d={theme:s,setTheme:e=>{localStorage.setItem(a,e),i(e)}};return u.jsx(c.Provider,{...m,value:d,children:t})}const M=()=>{const t=o.useContext(c);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};export{x as M,T as S,f as T,M as u};
