import { Chip } from '@mui/material' import { Zap, Clock, AlertCircle } from 'lucide-react' import type { FreshnessStatus } from '../../domain/enums' import { DS_COLORS } from '../../lib/ds' import { FRESHNESS_LABELS } from '../../lib/constants' interface FreshnessBadgeProps { status: FreshnessStatus size?: 'small' | 'medium' } const ICONS: Record = { FRESH: Zap, STALE: Clock, OUTDATED: AlertCircle, } export function FreshnessBadge({ status, size = 'small' }: FreshnessBadgeProps) { const { bg, fg } = DS_COLORS.freshness[status] const Icon = ICONS[status] return ( } aria-label={`Datenaktualität: ${FRESHNESS_LABELS[status] ?? status}`} sx={{ bgcolor: bg, color: fg, border: 'none', fontWeight: 600, fontSize: '0.7rem', '& .MuiChip-icon': { ml: 0.5 }, }} /> ) }