"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function n(t,s,n){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap","Start"===n);const a=o["onTap"+("End"===n?"":n)];a&&r.frame.postRender((()=>a(s,e.extractEventInfo(s))))}class o extends t.Feature{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=s.press(e,((e,t)=>(n(this.node,t,"Start"),(e,t)=>{let{success:s}=t;return n(this.node,e,s?"End":"Cancel")})),{useGlobalTarget:t,stopPropagation:!1===r?.tap})}unmount(){}}exports.PressGesture=o;
//# sourceMappingURL=press.mjs.js.map
