'use client'; import type { DraftStatus } from './useDraft'; interface DraftNoticeProps { status: DraftStatus; /** What the draft belongs to, e.g. "page structure" or "entry". */ subject: string; onDiscard: () => void; onRestore: () => void; onDismiss: () => void; } /** * Tells the operator that unsaved edits came back — or could not come back on * their own (#592). A restored draft must never look like the saved state: it * is still unsaved, and the save bar says so, but without this line the edits * would simply be there with no hint of where they came from. */ export default function DraftNotice({ status, subject, onDiscard, onRestore, onDismiss, }: DraftNoticeProps) { if (status === 'none') return null; return (