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

Defaulting to \`null\`.`}var R=P,M=h;const V="_wrapper_1khgw_1",A="_backgroundContrast_1khgw_9",S="_backgroundWhite_1khgw_13",D="_indicator_1khgw_17",l={wrapper:V,backgroundContrast:A,backgroundWhite:S,indicator:D};function O({value:r,width:e,height:n,backgroundColor:t="contrast",indicatorBackgroundColor:a,className:u,showReverse:c=!1}){return i.jsx(R,{value:r,className:k(l.wrapper,t==="contrast"&&l.backgroundContrast,t==="white"&&l.backgroundWhite,u&&u),style:{width:e,height:n},children:i.jsx(M,{className:l.indicator,style:{width:`${c?100-r:r}%`,backgroundColor:a}})})}export{O as P};
//# sourceMappingURL=Progress-FgQwsX8-.js.map