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

import { ref, onMounted, onUnmounted } from 'vue';
import { isServer } from '../utils/dom.mjs';
import '../_chunks/dep-eba0ea6e.mjs';
import '../_chunks/dep-876fb3ec.mjs';
import '../_chunks/dep-469b4ae0.mjs';
import '../_chunks/dep-255303ba.mjs';
import '../_chunks/dep-b57180d0.mjs';
import '../_chunks/dep-c8d7b6b4.mjs';
import '../_chunks/dep-3da99438.mjs';
import '../_chunks/dep-5717e263.mjs';
import '../_chunks/dep-a8bcacea.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
