import{useCallback as e,useMemo as r}from"react";import{useCarousel as t}from"./useCarousel.js";let useListCarousel=l=>{let{productImages:u,itemPerRow:s,vertical:i}=l,{moveToIdx:n}=t(),o=e(()=>{let e=[...u];return e?.splice(n,s)},[u,s,n]),a=r(()=>{let e=o();if(e.length>=s)return e;if(i)return[...u];let r=[...u],t=s-e.length;return r.push(...Array(t).fill(null)),r},[o,s,u,i]);return{listRender:a}};export{useListCarousel};
