export { RootVoussoirProvider } from '../../dist/RootVoussoirProvider-2d66480c.esm.js';
export { NextRootProvider } from '../../dist/NextRootProvider-9009e010.esm.js';
import { jsx } from 'react/jsx-runtime';
export { useRootColorScheme } from '../../dist/useRootColorScheme-750bd034.esm.js';

const script = `
let classList = document.documentElement.classList;
let storedPreference = localStorage.getItem('keystatic-root-color-scheme');
let schemeClasses = [...classList].filter((name) => name.includes('scheme'));

if (storedPreference === 'dark') {
  classList.remove(schemeClasses);
  classList.add('ksv-scheme--dark');
} else if (storedPreference === 'light') {
  classList.remove(schemeClasses);
  classList.add('ksv-scheme--light');
} else {
  classList.remove(schemeClasses);
  classList.add('ksv-scheme--auto');
}
`.replace(/\n|\s{2,}/g, '');

/** @deprecated use `nextRootScript` instead. */
const mediaQueryOnlyColorSchemeScaleScript = /*#__PURE__*/jsx("script", {
  dangerouslySetInnerHTML: {
    __html: script
  }
});
const nextRootScript = /*#__PURE__*/jsx("script", {
  dangerouslySetInnerHTML: {
    __html: script
  }
});

export { mediaQueryOnlyColorSchemeScaleScript, nextRootScript };
