import styles from './styles.module.css'; export type ProgressProps = { label: string; max?: number; showValue?: boolean; showLabel?: boolean; value: number; }; export function Progress({ label, max = 100, showValue = true, showLabel = true, value, }: ProgressProps) { const safeMax = Number.isFinite(max) && max > 0 ? max : 0; const safeValue = Number.isFinite(value) ? Math.max(0, Math.min(value, safeMax)) : 0; const percent = safeMax === 0 ? 0 : Math.round((safeValue / safeMax) * 100); return (