'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var RootVoussoirProvider = require('../../dist/RootVoussoirProvider-a7a6557d.cjs.js');
var NextRootProvider = require('../../dist/NextRootProvider-87944957.cjs.js');
var jsxRuntime = require('react/jsx-runtime');
var useRootColorScheme = require('../../dist/useRootColorScheme-47bb22c0.cjs.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__*/jsxRuntime.jsx("script", {
  dangerouslySetInnerHTML: {
    __html: script
  }
});
const nextRootScript = /*#__PURE__*/jsxRuntime.jsx("script", {
  dangerouslySetInnerHTML: {
    __html: script
  }
});

Object.defineProperty(exports, 'RootVoussoirProvider', {
  enumerable: true,
  get: function () { return RootVoussoirProvider.RootVoussoirProvider; }
});
Object.defineProperty(exports, 'NextRootProvider', {
  enumerable: true,
  get: function () { return NextRootProvider.NextRootProvider; }
});
Object.defineProperty(exports, 'useRootColorScheme', {
  enumerable: true,
  get: function () { return useRootColorScheme.useRootColorScheme; }
});
exports.mediaQueryOnlyColorSchemeScaleScript = mediaQueryOnlyColorSchemeScaleScript;
exports.nextRootScript = nextRootScript;
