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