import{useEditorMode as e,filterToolbarPreview as r}from"@gem-sdk/core";import{useMemo as t,Children as o}from"react";let useMarquee=({children:u,isPause:m,isPreview:i,rate:a=0,speed:c=0})=>{let d=e(),p=t(()=>o.count(r(u)),[u]),s=t(()=>"edit"!==d||!m&&(!!i||"edit"!==d||a>0),[a,i,d,m]),f=t(()=>s?(c??0)*100:a,[a,s,c]);return{itemSize:p,isPlay:s,rateUse:f}};export{useMarquee};
