import{u as y}from"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import{u as v}from"./useDefaults-DESCdb0p-CFLjYrdG.js";import{l as m,A as P,B as t,ax as c,d as f,o as g,J as h,D as e,i as x,I as N,x as i,H as r,e as C,t as $,n as D,b as S}from"./index-D02r7Zsc.js";const j=m({__name:"BProgressBar",props:{animated:{type:Boolean,default:!1},label:{default:void 0},max:{default:void 0},precision:{default:0},showProgress:{type:Boolean,default:!1},showValue:{type:Boolean,default:!1},striped:{type:Boolean,default:!1},value:{default:0},variant:{default:null},bgVariant:{default:null},textVariant:{default:null}},setup(l){const a=v(l,"BProgressBar"),s=N(c,null),n=y(a),b=i(()=>[n.value,{"progress-bar-animated":a.animated||s?.animated.value,"progress-bar-striped":a.striped||s?.striped.value||a.animated||s?.animated.value}]),d=r(()=>a.precision),o=r(()=>a.value),u=r(()=>a.max??NaN),p=r(()=>s?.max.value??NaN),B=i(()=>a.showValue||s?.showValue.value?o.value.toFixed(d.value):a.showProgress||s?.showProgress.value?(o.value*100/(u.value||100)).toFixed(d.value):a.label!==void 0?a.label:""),V=i(()=>p.value?`${o.value*100/p.value}%`:u.value?`${o.value*100/u.value}%`:typeof a.value=="string"?a.value:`${a.value}%`);return(_,z)=>(g(),f("div",{class:D(["progress-bar",b.value]),style:x({width:V.value})},[h(_.$slots,"default",{},()=>[C($(B.value),1)])],6))}}),k=["aria-valuenow","aria-valuemax"],T=m({__name:"BProgress",props:{height:{default:void 0},animated:{type:Boolean,default:void 0},max:{default:100},precision:{default:void 0},showProgress:{type:Boolean,default:void 0},showValue:{type:Boolean,default:void 0},striped:{type:Boolean,default:void 0},value:{default:void 0},variant:{default:void 0},bgVariant:{default:void 0},textVariant:{default:void 0}},setup(l){const a=v(l,"BProgress");return P(c,{animated:t(()=>a.animated),max:t(()=>a.max),showProgress:t(()=>a.showProgress),showValue:t(()=>a.showValue),striped:t(()=>a.striped)}),(s,n)=>(g(),f("div",{class:"progress",role:"progressbar",style:x({height:e(a).height}),"aria-valuenow":e(a).value,"aria-valuemin":"0","aria-valuemax":e(a).max},[h(s.$slots,"default",{},()=>[S(j,{animated:e(a).animated,max:e(a).max,precision:e(a).precision,"show-progress":e(a).showProgress,"show-value":e(a).showValue,striped:e(a).striped,value:e(a).value,variant:e(a).variant,"text-variant":e(a).textVariant,"bg-variant":e(a).bgVariant},null,8,["animated","max","precision","show-progress","show-value","striped","value","variant","text-variant","bg-variant"])])],12,k))}});export{T as _,j as a};
