import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,t as n}from"./jsx-runtime-BWRPWl8p.js";import{a as r,r as i}from"./ThemeProvider-tBC-zLZT.js";import{pa as a}from"./index-DccLTdzK.js";var o=e(r()),s=e(t()),c=n(),l=1e3;function u(e,t,n){let r=(e-t)/(n-t)*100;return Math.round(r*l)/l}function d({min:e,now:t,max:n,label:r,visuallyHidden:i,striped:a,animated:s,className:l,style:d,variant:f,bsPrefix:p,...m},h){return(0,c.jsx)(`div`,{ref:h,...m,role:`progressbar`,className:(0,o.default)(l,`${p}-bar`,{[`bg-${f}`]:f,[`${p}-bar-animated`]:s,[`${p}-bar-striped`]:s||a}),style:{width:`${u(t,e,n)}%`,...d},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:i?(0,c.jsx)(`span`,{className:`visually-hidden`,children:r}):r})}var f=s.forwardRef(({isChild:e=!1,...t},n)=>{let r={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(r.bsPrefix=i(r.bsPrefix,`progress`),e)return d(r,n);let{min:l,now:u,max:f,label:p,visuallyHidden:m,striped:h,animated:g,bsPrefix:_,variant:v,className:y,children:b,...x}=r;return(0,c.jsx)(`div`,{ref:n,...x,className:(0,o.default)(y,_),children:b?a(b,e=>(0,s.cloneElement)(e,{isChild:!0})):d({min:l,now:u,max:f,label:p,visuallyHidden:m,striped:h,animated:g,bsPrefix:_,variant:v},n)})});f.displayName=`ProgressBar`;export{f as t};