"use strict";const e=require("react/jsx-runtime"),k=require("react"),c=require("./Label-DFDSAYVj.cjs.js"),w=require("./ProgressBar-h-7epPQV.cjs.js"),x=require("@chakra-ui/react"),C=require("@chakra-ui/react/styled-system"),V=require("./extract-style-props-DVhOcGEi.cjs.js"),F=require("./useObjectRef-4v2MxSjQ.cjs.js"),H=require("./flex-DwGL6TCj.cjs.js"),L=require("./box-CWni3A32.cjs.js"),{withProvider:O,withContext:t}=x.createSlotRecipeContext({key:"nimbusProgressBar"}),D=O("div","root"),G=t("div","track"),I=t("div","fill"),d=t("span","label"),u=t("span","value"),f=n=>{const{ref:b,value:o,minValue:h=0,maxValue:P=100,isDynamic:p=!0,isIndeterminate:r,label:s,formatOptions:m={style:"percent"},variant:$="solid",layout:i="stacked",colorPalette:j="primary",...g}=n,y=C.useSlotRecipe({key:"nimbusProgressBar"}),[B,S]=y.splitVariantProps({variant:$,colorPalette:j,...n}),[q]=V.extractStyleProps(S),R=k.useRef(null),v=F.$df56164dff5785e2$export$4338b53315abf666(x.mergeRefs(R,b));return e.jsx(D,{...B,...q,isDynamic:p,isIndeterminate:r,asChild:!0,children:e.jsx(w.$0393f8ab869a0f1a$export$c17561cb55d4db30,{ref:v,value:o,minValue:h,maxValue:P,isIndeterminate:r,formatOptions:m,...g,children:({percentage:a,valueText:l})=>e.jsxs(e.Fragment,{children:[i==="stacked"&&e.jsxs(H.Flex,{children:[s&&e.jsx(d,{asChild:!0,children:e.jsx(c.$01b77f81d0f07f68$export$b04be29aa201d4f5,{children:s})}),e.jsx(L.Box,{flexGrow:"1"}),s&&o&&e.jsx(u,{children:l})]}),i==="inline"&&s&&e.jsx(d,{lineHeight:"1",asChild:!0,children:e.jsx(c.$01b77f81d0f07f68$export$b04be29aa201d4f5,{children:s})}),e.jsx(G,{children:e.jsx(I,{style:{width:r?"40%":`${a}%`},"data-indeterminate":r,"data-complete":!r&&a!==void 0&&a>=100})}),i==="inline"&&o&&e.jsx(u,{lineHeight:"1",children:l})]})})})};f.displayName="ProgressBar";exports.ProgressBar=f;
//# sourceMappingURL=progress-bar-C4fVFQKR.cjs.js.map
