"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),e=require("./performFlipAnimation.js");exports.useFlipLayoutEffect=function(n){var t=n.wellIds,i=n.duration,o=n.easing,u=n.rowRefs,c=n.previousPositions,s=n.previousScrollTop,a=n.shouldAnimate,f=n.animatingRef,l=n.scrollRef;r.useLayoutEffect((function(){if(a.current&&0!==u.current.size){a.current=!1,f.current=!0;var r=e.performFlipAnimation({rowRefs:u.current,previousPositions:c.current,previousScrollTop:s.current,scrollContainer:l.current,duration:i,easing:o}).animations;return r.length>0?Promise.all(r.map((function(r){return r.finished}))).then((function(){f.current=!1})).catch((function(){f.current=!1})):f.current=!1,function(){r.forEach((function(r){return r.cancel()})),f.current=!1}}}),[t,i,o,u,c,s,a,f,l])};
//# sourceMappingURL=useFlipLayoutEffect.js.map
