"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const isBrowser = require("./dist-es-utils-is-browser.cjs");
const state = require("./dist-es-utils-reduced-motion-state.cjs");
function initPrefersReducedMotion() {
  state.hasReducedMotionListener.current = true;
  if (!isBrowser.isBrowser)
    return;
  if (window.matchMedia) {
    const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
    const setReducedMotionPreferences = () => state.prefersReducedMotion.current = motionMediaQuery.matches;
    motionMediaQuery.addListener(setReducedMotionPreferences);
    setReducedMotionPreferences();
  } else {
    state.prefersReducedMotion.current = false;
  }
}
exports.initPrefersReducedMotion = initPrefersReducedMotion;
//# sourceMappingURL=dist-es-utils-reduced-motion-index.cjs.map
