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