import { onMounted as h } from "vue";
import { useEventListener as o } from "./useEventListener.js";
import { requestTick as f } from "../helpers/utils.js";
function w(i, s) {
  const e = f(() => {
    if (i.value) {
      const { scrollTop: n, scrollLeft: r, scrollHeight: l, scrollWidth: c, clientHeight: u, clientWidth: d } = document.documentElement, t = i.value.getBoundingClientRect();
      s({
        scrollTop: n,
        scrollLeft: r,
        scrollHeight: l,
        scrollWidth: c,
        clientHeight: u,
        clientWidth: d,
        offsetY: n + t.y,
        offsetX: r + t.x,
        top: t.top,
        right: t.right,
        bottom: t.bottom,
        left: t.left,
        width: t.width,
        height: t.height,
        x: t.x,
        y: t.y
      });
    }
  });
  h(e), o(window, "scroll", e, { capture: !0, passive: !0 }), o(window, "resize", e, { passive: !0 }), o(window, "adjust", e, !0);
}
export {
  w as useElementPosition
};
//# sourceMappingURL=usePosition.js.map
