import { STATUS_STYLES } from './tokens' // Unified StatusBadge — replaces both src/components/StatusBadge.jsx // and the StatusBadge in TablePrimitives.jsx. // // Greek labels map to the canonical status keys used across the app. const LABELS = { free: 'Ελεύθερο', open: 'Ανοιχτό', active: 'Ενεργό', partially_paid: 'Μερική πληρωμή', paid: 'Πληρώθηκε', closed: 'Κλειστό', 'force-closed': 'Αναγκαστικό κλείσιμο', cancelled: 'Ακυρώθηκε', completed: 'Ολοκληρώθηκε', failed: 'Απέτυχε', success: 'Επιτυχία', } export default function Badge({ status, pulse = false }) { const s = STATUS_STYLES[status] || STATUS_STYLES.closed const label = LABELS[status] ?? (status ? status.replace(/[_-]/g, ' ') : 'άγνωστο') return ( {pulse && (status === 'active' || status === 'open') && ( )} {label} ) }