import { Box, LinearProgress, Typography } from '@mui/material' import { dataQualityHex } from '../../lib/utils' import { scoreToDataQualityLevel } from '../../lib/ds' import { DATA_QUALITY_LABELS } from '../../lib/constants' interface DataQualityScoreProps { score: number compact?: boolean } export function DataQualityScore({ score, compact = false }: DataQualityScoreProps) { const color = dataQualityHex(score) const pct = Math.round(score * 100) const level = scoreToDataQualityLevel(score) const label = DATA_QUALITY_LABELS[level] ?? level if (compact) { return ( {pct}% ) } return ( {label} {pct}% ) }