import type { MessageKey } from "@/lib/i18n/messages"

/**
 * What a notification says, named rather than written out.
 *
 * A notification is read by whoever it was sent to, in their language, days
 * after it was sent. 183 of the 193 people here read Thai, so a row holding
 * "Somchai sent your work back" is a row that can only ever be read in English:
 * the sentence was chosen when it was stored, by a process that had never been
 * told who would open it. So what is stored is the key, and the sentence is
 * chosen at the moment somebody looks.
 *
 * Every such key is namespaced `notify.`, and this type is that convention
 * rather than a second list to keep in step: adding `notify.something` to the
 * dictionary adds it here, and a key that is not in the dictionary is not a
 * member of the type at all.
 *
 * Types only, with nothing under it, so the schema, the services and a screen
 * can all take it without any of them dragging a database into a browser.
 */
export type NoticeKey = Extract<MessageKey, `notify.${string}`>
