const a="theme-transition",s="paskia-theme";function c(e,n=document.documentElement,o=!1){if(o){let t=document.getElementById(a);t||(t=document.createElement("style"),t.id=a,t.textContent="*, *::before, *::after { transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s !important; }",document.head.appendChild(t)),setTimeout(()=>document.getElementById(a)?.remove(),350)}const m=e==="dark"||e!=="light"&&matchMedia("(prefers-color-scheme:dark)").matches;n.classList.toggle("dark",m)}function r(){return localStorage.getItem(s)||""}function i(e){e?localStorage.setItem(s,e):localStorage.removeItem(s)}function l(){c(r())}function d(e,n=!1){const o=e?.user?.theme||"";i(o),c(o,document.documentElement,n)}export{c as a,r as g,l as i,d as u};
