/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

import { ref, onMounted, onUnmounted } from 'vue';
import { isServer } from '../utils/dom.mjs';
import '../_chunks/dep-a0b4a044.mjs';
import '../_chunks/dep-1cf2b129.mjs';
import '../_chunks/dep-c959a6fb.mjs';
import '../_chunks/dep-b4041200.mjs';
import '../_chunks/dep-e3b14d70.mjs';
import '../_chunks/dep-66d6733b.mjs';
import '../_chunks/dep-c31e1d9e.mjs';
import '../_chunks/dep-6b22dd27.mjs';
import '../_chunks/dep-0f0c89ff.mjs';
import '../utils/easing.mjs';

var useMouse = function useMouse() {
  var x = ref(0);
  var y = ref(0);
  var onMouseMove = function onMouseMove(e) {
    x.value = e.clientX;
    y.value = e.clientY;
  };
  if (!isServer) {
    onMounted(function () {
      window.addEventListener("mousemove", onMouseMove, {
        passive: true
      });
    });
    onUnmounted(function () {
      window.removeEventListener("mousemove", onMouseMove);
    });
  }
  return {
    x: x,
    y: y
  };
};

export { useMouse };
//# sourceMappingURL=util.mjs.map
