"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs38.js"),d=require("./index.cjs40.js"),e=require("./index.cjs56.js"),N=require("./index.cjs8.js"),P=(r,o,l)=>Math.min(Math.max(r,o),l),x=({value:r,max:o=100,segments:l=10,size:f="md",tone:g="secondary",showValueLabel:h=!1,valueLabel:p,sequentialAnimation:u=!1,animationStepMs:j=80,className:M,testId:v,"aria-label":R,...b})=>{const s=Math.max(1,Math.floor(o)),n=P(r,0,s),m=Math.max(1,Math.floor(l)),y=n/s,c=Math.round(y*m),i=h?p??`${Math.round(n)} / ${s}`:null;return a.jsxRuntimeExports.jsxs(N.Root,{className:d(e.default.root,e.default[`root--${f}`],M),testId:v,...b,children:[a.jsxRuntimeExports.jsx("div",{className:e.default.track,role:"progressbar","aria-label":R??"Progress","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":Math.round(n),children:a.jsxRuntimeExports.jsx("div",{className:e.default.segments,children:Array.from({length:m}).map((E,t)=>a.jsxRuntimeExports.jsx("span",{className:d(e.default.segment,e.default[`segment--${g}`],t<c&&e.default["segment--active"],u&&t<c&&e.default["segment--sequential"]),style:u?{"--segment-delay":`${t*j}ms`}:void 0,"aria-hidden":"true"},t))})}),i&&a.jsxRuntimeExports.jsx("span",{className:e.default.valueLabel,children:i})]})};x.displayName="ProgressBar";exports.ProgressBar=x;
//# sourceMappingURL=index.cjs16.js.map
