import { cn } from "~/utils/cn"; import { TONE_FILL, type Tone } from "~/ui/tones"; const FULL_PERCENT = 100; const WARN_PERCENT = 80; /** Picks neutral → warning → danger as usage approaches a quota. */ export function quotaTone(percent: number): Tone { if (percent >= FULL_PERCENT) return "danger"; if (percent >= WARN_PERCENT) return "warning"; return "neutral"; } type Props = { /** 0–100. Omit for an indeterminate animation. */ percent?: number; tone?: Tone; className?: string; }; export function ProgressTrack({ percent, tone = "neutral", className }: Props) { const indeterminate = percent === undefined; return (