import { Feature } from "./dist-es-motion-features-Feature.js";
import "../motion-utils/dist-es-errors.js";
import { noop } from "../motion-utils/dist-es-noop.js";
import { VisualElementDragControls } from "./dist-es-gestures-drag-VisualElementDragControls.js";
class DragGesture extends Feature {
  constructor(node) {
    super(node);
    this.removeGroupControls = noop;
    this.removeListeners = noop;
    this.controls = new VisualElementDragControls(node);
  }
  mount() {
    const { dragControls } = this.node.getProps();
    if (dragControls) {
      this.removeGroupControls = dragControls.subscribe(this.controls);
    }
    this.removeListeners = this.controls.addListeners() || noop;
  }
  unmount() {
    this.removeGroupControls();
    this.removeListeners();
  }
}
export {
  DragGesture
};
//# sourceMappingURL=dist-es-gestures-drag-index.js.map
