import { useState as n, useEffect as o } from "react";
const s = () => document.documentElement.classList.contains("dark"), c = () => {
  const [r, e] = n(!1);
  return o(() => {
    e(s());
    const t = new MutationObserver(() => {
      e(s());
    });
    return t.observe(document.documentElement, {
      attributes: !0,
      attributeFilter: ["class"]
    }), () => {
      t.disconnect();
    };
  }, []), { isDarkTheme: r };
};
export {
  c as useIsDarkTheme
};
