import { isDragActive as d } from "./drag/state/is-active.es.js";
import { setupGesture as m } from "./utils/setup.es.js";
function c(n) {
  return !(n.pointerType === "touch" || d());
}
function h(n, p, u = {}) {
  const [f, r, a] = m(n, u), v = (e) => {
    if (!c(e))
      return;
    const { target: t } = e, o = p(t, e);
    if (typeof o != "function" || !t)
      return;
    const i = (s) => {
      c(s) && (o(s), t.removeEventListener("pointerleave", i));
    };
    t.addEventListener("pointerleave", i, r);
  };
  return f.forEach((e) => {
    e.addEventListener("pointerenter", v, r);
  }), a;
}
export {
  h as hover
};
//# sourceMappingURL=hover.es.js.map
