"use strict";const e=require("react/jsx-runtime"),a=require("react"),n=require("../tools/tools.cjs"),c=require("./progress-bar.cjs"),y=require("./progress-stacked.cjs"),o=function(x){const{animated:k,as:i="div",barProps:B,bg:b,children:l,className:d,dropOldClass:p,now:j,options:S,stacked:f,stackedProps:h,striped:m,style:g,variables:u,...P}=x,q=(S??[]).map((s,r)=>({...s,id:s.id??r})),[w]=a.useState(q),t=a.useMemo(()=>{const s=n.classx(!p&&"progress",d),r=n.stylex((v,O)=>({tKey:n.convertBsKeyToVar(O)}),u,g);return{className:s,style:r}},[d,p,g,u]);return e.jsx(e.Fragment,{children:f?e.jsx(y.ProgressStacked,{...h,children:w.map(s=>{let r=t.style;return s.now&&(r={...r,width:`${s.now}%`}),a.createElement(i,{...P,...t,...s.props,key:s.id,style:r},e.jsx(c.ProgressBar,{...s.barProps,animated:s.animated,bg:s.bg,striped:s.striped,children:l}))})}):e.jsx(i,{...P,...t,children:e.jsx(c.ProgressBar,{...B,animated:k,bg:b,now:j,striped:m,children:l})})})};o.Bar=c.ProgressBar;o.Stacked=y.ProgressStacked;o.displayName="BRL.Progress";exports.Progress=o;
//# sourceMappingURL=progress.cjs.map
