import { useRuntime } from '../../context/RuntimeContext.jsx'
// Shows the plate, or a precise reason it's absent (OCR off vs nothing detected).
export default function PlateChip({ plate }) {
const rt = useRuntime()
if (plate && plate.text) {
return (
{plate.text}{' '}
{plate.regex_ok ? (
✓ valid format
) : (
(format unverified)
)}
)
}
if (rt && rt.plate_ocr_enabled === false)
return plate reading disabled
return no plate detected
}