import { isMouseEvent as s } from "./utils/event-type.es.js";
import { AnimationType as m } from "../render/utils/types.es.js";
import { usePointerEvent as v } from "../events/use-pointer-event.es.js";
import { isDragActive as f } from "./drag/utils/lock.es.js";
function u(o, n, e) {
  return function(t, r) {
    var i;
    !s(t) || f() || ((i = o.animationState) === null || i === void 0 || i.setActive(m.Hover, n), e == null || e(t, r));
  };
}
function l(o) {
  var n = o.onHoverStart, e = o.onHoverEnd, t = o.whileHover, r = o.visualElement;
  v(r, "pointerenter", n || t ? u(r, !0, n) : void 0, { passive: !n }), v(r, "pointerleave", e || t ? u(r, !1, e) : void 0, { passive: !e });
}
export {
  l as useHoverGesture
};
//# sourceMappingURL=use-hover-gesture.es.js.map
