import{useRef as r,useCallback as e}from"react";import{captureRowPositions as o}from"./captureRowPositions.js";import{useFlipLayoutEffect as t}from"./useFlipLayoutEffect.js";var n=function(n,i,u){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=s.duration,a=void 0===c?300:c,l=s.easing,f=void 0===l?"ease-out":l,p=u,d=r(null),v=r(new Map),m=r(new Map),w=r(0),R=r(!1),g=e((function(r){d.current=r}),[]),P=e((function(r,e){e?v.current.set(r,e):v.current.delete(r)}),[]),h=e((function(){var r,e;if(0!==v.current.size){var t=null!==(r=null===(e=i.current)||void 0===e?void 0:e.scrollTop)&&void 0!==r?r:0;m.current=o(v.current,t),w.current=t,R.current=!0,p.current=!0}}),[i,p]);return t({wellIds:n,duration:a,easing:f,rowRefs:v,previousPositions:m,previousScrollTop:w,shouldAnimate:R,animatingRef:p,scrollRef:i}),{tableBodyRef:g,registerRow:P,capturePositions:h}};export{n as useRowReorderAnimation};
//# sourceMappingURL=useRowReorderAnimation.js.map
