"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./VisualElementDragControls.mjs.js"),o=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../motion-utils/dist/es/noop.mjs.js");class r extends o.Feature{constructor(o){super(o),this.removeGroupControls=e.noop,this.removeListeners=e.noop,this.controls=new s.VisualElementDragControls(o)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||e.noop}update(){const{dragControls:s}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};s!==o&&(this.removeGroupControls(),s&&(this.removeGroupControls=s.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}exports.DragGesture=r;
//# sourceMappingURL=index.mjs.js.map
