import{jsx as u}from"react/jsx-runtime";import{Box as d}from"@styled/jsx";import{token as e}from"@styled/tokens";import{useMemo as g}from"react";const h=75,m=90,a=e("colors.brand.lighter"),n=e("colors.negative.lighter"),f=e("colors.neutral.secondary"),p=e("colors.positive.lighter"),l=e("colors.warning.lighter"),x=({autoTarget:o="min",progress:r=0})=>o==="min"?r>m?n:r>h?l:a:r<=100-m?n:r<=100-h?l:r===100?p:a,y=({autoTarget:o,current:r=0,strokeWidth:t=8,total:s=100,variant:c="auto"})=>{const i=g(()=>Math.min(r,s)/s*100,[r,s]),b=g(()=>{switch(c){case"branded":return a;case"success":return p;case"error":return n;case"warning":return l;case"neutral":return f;default:return x({autoTarget:o,progress:i})}},[i,c]);return u(d,{bgColor:"surface.tertiary",borderRadius:"2rem",position:"relative",w:"full",style:{height:`${t}px`},children:u(d,{position:"absolute",borderRadius:"2rem",borderStyle:"solid",borderWidth:"thick",borderColor:"surface.primary",style:{height:`${t}px`,minWidth:`${t}px`,width:`${i}%`,background:b}})})};export{y as ProgressBar};
//# sourceMappingURL=progress-bar.js.map
