import{r as u,j as l}from"./client-BbMi5ewG.js";import{c as y}from"./index-B5gX5Cyp.js";import{P as f}from"./index-C4Ytkwtd.js";import{a as I}from"./utils-Q0fnGDhj.js";var d="Progress",m=100,[E]=y(d),[R,j]=E(d),c=u.forwardRef((r,e)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:b=w,...h}=r;(a||a===0)&&!p(a)&&console.error(_(`${a}`,"Progress"));const t=p(a)?a:m;o!==null&&!v(o,t)&&console.error(M(`${o}`,"Progress"));const s=v(o,t)?o:null,$=i(s)?b(s,t):void 0;return l.jsx(R,{scope:n,value:s,max:t,children:l.jsx(f.div,{"aria-valuemax":t,"aria-valuemin":0,"aria-valuenow":i(s)?s:void 0,"aria-valuetext":$,role:"progressbar","data-state":P(s,t),"data-value":s??void 0,"data-max":t,...h,ref:e})})});c.displayName=d;var x="ProgressIndicator",g=u.forwardRef((r,e)=>{const{__scopeProgress:n,...o}=r,a=j(x,n);return l.jsx(f.div,{"data-state":P(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:e})});g.displayName=x;function w(r,e){return`${Math.round(r/e*100)}%`}function P(r,e){return r==null?"indeterminate":r===e?"complete":"loading"}function i(r){return typeof r=="number"}function p(r){return i(r)&&!isNaN(r)&&r>0}function v(r,e){return i(r)&&!isNaN(r)&&r<=e&&r>=0}function _(r,e){return`Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${m}\`.`}function M(r,e){return`Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${m} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var N=c,V=g;const A=u.forwardRef(({className:r,value:e,...n},o)=>l.jsx(N,{ref:o,className:I("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",r),...n,children:l.jsx(V,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));A.displayName=N.displayName;export{A as P};
//# sourceMappingURL=progress-LiitFnHM.js.map
