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