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