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