"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./drag/state/is-active.mjs.js"),t=require("./utils/setup.mjs.js");exports.hover=function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[o,s,d]=t.setupGesture(n,i);return o.forEach((t=>{let n,i=!1,o=!1;const d=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",v)},p=e=>{i=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),o&&(o=!1,d(e))},v=e=>{"touch"!==e.pointerType&&(i?o=!0:d(e))};t.addEventListener("pointerenter",(i=>{if("touch"===i.pointerType||e.isDragActive())return;o=!1;const d=r(t,i);"function"==typeof d&&(n=d,t.addEventListener("pointerleave",v,s))}),s),t.addEventListener("pointerdown",(()=>{i=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)}),s)})),d};
//# sourceMappingURL=hover.mjs.js.map
