import { Chip } from '@mui/material' import type { BackupState } from './api.ts' /** The colour of each result of a backup run. */ const RESULT_COLORS: Record = { ok: 'success', warning: 'warning', failed: 'error', interrupted: 'error', running: 'info', } /** The result of the last backup run as a chip, or "never" before the first. */ export function BackupChip(props: { state: BackupState | null }) { return props.state ? : }