import{useLayoutEffect as r}from"react";import{performFlipAnimation as n}from"./performFlipAnimation.js";var t=function(t){var e=t.wellIds,o=t.duration,i=t.easing,c=t.rowRefs,u=t.previousPositions,s=t.previousScrollTop,a=t.shouldAnimate,f=t.animatingRef,l=t.scrollRef;r((function(){if(a.current&&0!==c.current.size){a.current=!1,f.current=!0;var r=n({rowRefs:c.current,previousPositions:u.current,previousScrollTop:s.current,scrollContainer:l.current,duration:o,easing:i}).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}}}),[e,o,i,c,u,s,a,f,l])};export{t as useFlipLayoutEffect};
//# sourceMappingURL=useFlipLayoutEffect.js.map
