import Box from "@mui/material/Box"; import type { DocumentLockInfo } from "../../hooks/useDocumentLock"; /** * Warning banner shown when another user holds the document edit lock * (extracted from OfferDetail; shared by the document detail pages). * Renders nothing when the lock is free / held by the current user. * * `entityWord` is the Czech accusative for the document ("Nabídku" / * "Objednávku") — both are feminine, so the rest of the sentence is shared. */ export default function LockBanner({ lockedBy, entityWord, }: { lockedBy: DocumentLockInfo | null; entityWord: string; }) { if (!lockedBy) return null; return ( {entityWord} právě upravuje {lockedBy.full_name}. Můžete ji pouze prohlížet. ); }