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