import { onScopeDispose } from "vue";
import { convertToUnit } from "../../utils/dist/index.mjs";
function pointerPositionStrategy(data, props, contentStyles, _anchorClasses) {
  const updatePosition = (e) => {
    var _a, _b;
    const box = { left: e.clientX, top: e.clientY };
    Object.assign(contentStyles.value, {
      position: "fixed",
      left: convertToUnit(box.left + +((_a = props.offset) != null ? _a : 0)),
      top: convertToUnit(box.top + +((_b = props.offset) != null ? _b : 0))
    });
  };
  document.addEventListener("mousemove", updatePosition);
  onScopeDispose(() => {
    document.removeEventListener("mousemove", updatePosition);
  });
  return {
    updatePosition: void 0
  };
}
export {
  pointerPositionStrategy
};
//# sourceMappingURL=pointer.mjs.map
