"use client"
import{c as s}from"./chunk-IE56MXNA.mjs";import{Slot as y}from"@radix-ui/react-slot";import R,{useEffect as F,useState as V}from"react";import{jsxs as T}from"react/jsx-runtime";var E=R.forwardRef(({asChild:m,className:u,children:e,prefix:c,duration:t=250,as:i="span",style:l="compact",...p},f)=>{let[o,N]=V(Number(e));return F(()=>{if(isNaN(Number(e))){console.warn("CountingNumbers expects a numeric value as children.");return}let d=Number(e),n=o,b=d,C=performance.now(),r=()=>{let g=performance.now(),a=Math.min((g-C)/t,1),w=n+(b-n)*a;N(Math.round(w)),a<1&&requestAnimationFrame(r)};requestAnimationFrame(r)},[e,t]),T(m?y:i,{ref:f,className:u,...p,children:[c,s(o,l==="full"?{full:!0}:void 0)]})});E.displayName="CountingNumbers";export{E as a};
