import { useCallback, useRef } from 'react';
import { mouseMoveAnywhere } from '../utilities/mouse-move-anywhere';
export var useMouseMoveAnywhere = function useMouseMoveAnywhere(cb, windowProxy) {
  var disposer = useRef();
  return useCallback(function (dom) {
    if (dom) {
      disposer.current && disposer.current();
      disposer.current = mouseMoveAnywhere(dom, cb, windowProxy);
    }
  }, [cb]);
};