"use strict";const e=require("react/jsx-runtime"),k=require("react"),c=require("./Label-szabofdc.cjs.js"),w=require("./ProgressBar-BnIWveAr.cjs.js"),f=require("@chakra-ui/react"),C=require("@chakra-ui/react/styled-system"),V=require("./extract-style-props-B4hqila-.cjs.js"),F=require("./useObjectRef-4v2MxSjQ.cjs.js"),H=require("@chakra-ui/react/flex"),L=require("./box-CWni3A32.cjs.js"),{withProvider:O,withContext:t}=f.createSlotRecipeContext({key:"progressBar"}),D=O("div","root"),G=t("div","track"),I=t("div","fill"),d=t("span","label"),x=t("span","value"),u=l=>{const{ref:p,value:o,minValue:h=0,maxValue:b=100,isDynamic:P=!0,isIndeterminate:r,label:s,formatOptions:$={style:"percent"},variant:j="solid",layout:i="stacked",colorPalette:g="primary",...m}=l,y=C.useSlotRecipe({key:"progressBar"}),[B,S]=y.splitVariantProps({variant:j,colorPalette:g,...l}),[q]=V.extractStyleProps(S),R=k.useRef(null),v=F.$df56164dff5785e2$export$4338b53315abf666(f.mergeRefs(R,p));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:b,isIndeterminate:r,formatOptions:$,...m,children:({percentage:a,valueText:n})=>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(x,{children:n})]}),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(x,{lineHeight:"1",children:n})]})})})};u.displayName="ProgressBar";exports.ProgressBar=u;
//# sourceMappingURL=progress-bar-dRKyuT1-.cjs.js.map
