import{useContext as t,useEffect as o}from"react";import{__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import{MotionConfigContext as n}from"../../context/MotionConfigContext.js";import{useConstant as s}from"../../utils/use-constant.js";import{VisualElementDragControls as e}from"./VisualElementDragControls.js";function i(i,m){var u=i.dragControls,f=t(n).transformPagePoint,a=s((function(){return new e({visualElement:m})}));a.setProps(r(r({},i),{transformPagePoint:f})),o((function(){return u&&u.subscribe(a)}),[a]),o((function(){return a.mount(m)}),[])}export{i as useDrag};
//# sourceMappingURL=use-drag.js.map
