'use client';
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{memo as a,forwardRef as i,useCallback as m,Fragment as t,Children as s}from"react";import{useMarqueeBase as l}from"../hooks/useMarqueeBase.js";import{createStyle as n}from"@gem-sdk/system";let Marquee=i(function(a,i){let{className:c="",onFinish:o,onCycleComplete:d,children:u,isFullWidth:f,uniqueId:h}=a,{containerRef:q,containerStyle:p,childStyle:y,marqueeStyle:v,marqueeRef:N,multiplier:M}=l(a,i),k=m(r=>[...Array(Number.isFinite(r)&&r>=0?r:0)].map((r,a)=>e(t,{children:s.map(u,r=>e("div",{"marquee-item-key":`${h}-${a+100}`,style:y,className:"rfm-child",children:r}))},a)),[y,u,h]),$=n(p),g=n(y),A=n(v);return r("div",{ref:q,style:{...$,overflow:"unset"},className:"rfm-marquee-container "+c,children:[r("div",{className:"rfm-marquee",style:A,onAnimationIteration:d,onAnimationEnd:o,children:[e("div",{className:"rfm-initial-child-container",ref:N,children:s.map(u,r=>e("div",{style:g,"marquee-item-key":`${h}-0`,className:`rfm-child ${f?"gp-w-full":""}`,children:r},String(r)))}),k(M-1)]}),e("div",{className:"rfm-marquee",style:v,children:k(M)})]})});var MarqueeBase=a(Marquee);export{MarqueeBase as default};
