import { isBrowser } from "./dist-es-utils-is-browser.js";
import { hasReducedMotionListener, prefersReducedMotion } from "./dist-es-utils-reduced-motion-state.js";
function initPrefersReducedMotion() {
  hasReducedMotionListener.current = true;
  if (!isBrowser)
    return;
  if (window.matchMedia) {
    const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
    const setReducedMotionPreferences = () => prefersReducedMotion.current = motionMediaQuery.matches;
    motionMediaQuery.addListener(setReducedMotionPreferences);
    setReducedMotionPreferences();
  } else {
    prefersReducedMotion.current = false;
  }
}
export {
  initPrefersReducedMotion
};
//# sourceMappingURL=dist-es-utils-reduced-motion-index.js.map
