import React from "react"; const toneColor = { accent: "var(--action-primary)", ok: "var(--status-ok)", warn: "var(--status-warn)", error: "var(--status-error)", }; /** * Thin determinate/indeterminate progress bar — library scans, transcodes. */ export function ProgressBar({ value = null, tone = "accent", height = 6, showLabel = false, style = {} }) { const c = toneColor[tone] || toneColor.accent; const indeterminate = value == null; const pct = Math.max(0, Math.min(100, value ?? 0)); return (
{indeterminate ? ( ) : ( )}
{showLabel && !indeterminate && ( {Math.round(pct)}% )}
); }