import{useEffect as a}from"react";function i(){a(()=>{const t=document.documentElement;t.classList.contains("dark")||t.classList.add("dark"),t.setAttribute("data-force-dark","true");let e;const r=new MutationObserver(()=>{e=requestAnimationFrame(()=>{t.classList.contains("dark")||t.classList.add("dark")})});return r.observe(t,{attributes:!0,attributeFilter:["class"]}),()=>{r.disconnect(),e&&cancelAnimationFrame(e),t.classList.remove("dark"),t.removeAttribute("data-force-dark")}},[])}export{i as useForceDarkTheme};
