export interface MessageCatalog { required: string; minLength: string; maxLength: string; min: string; max: string; pattern: string; email: string; /** currency: more than two decimal places. */ decimals: string; /** number with `integer: true`: a fraction. */ integer: string; dateDisabled: string; compareEq: string; compareNe: string; compareGt: string; compareGte: string; compareLt: string; compareLte: string; fileTooLarge: string; fileTypeNotAllowed: string; fileRejectedTooLarge: string; uploading: string; uploadFailed: string; removeFile: string; chooseFile: string; chooseFiles: string; orDropHere: string; uploadMaxSize: string; retry: string; addRow: string; removeRow: string; minRows: string; maxRows: string; /** `min_rows: 1`, where "{n} rows" would read "1 rows". */ minRowsOne: string; /** `max_rows: 1`. */ maxRowsOne: string; maxItems: string; ratingRange: string; ratingValue: string; stepOf: string; referenceNotFound: string; tagTooLong: string; tagNotAllowed: string; tagDuplicate: string; removeTag: string; next: string; submit: string; back: string; step: string; approve: string; reject: string; decision: string; comment: string; commentRequiredSuffix: string; decisionRequired: string; commentRequired: string; nothingToReview: string; /** A `submit` script returned false without adding an error message. */ scriptBlocked: string; yes: string; no: string; emptyValue: string; /** Placeholder option of a dropdown. */ choose: string; rowCount: string; results: string; columns: string; selectAll: string; selectRow: string; sortBy: string; rowActions: string; optional: string; close: string; dismiss: string; moreActions: string; darkTheme: string; opensInNewTab: string; otpCharacter: string; row: string; removeRowN: string; stepDone: string; stepCurrent: string; today: string; now: string; clear: string; } export type MessageKey = keyof MessageCatalog; export type Locale = 'en' | 'th'; /** * Switch every built-in string to a locale, optionally patching single keys: * * setLocale('th') // all Thai * setLocale('th', { required: 'ห้ามว่าง' }) // Thai + one custom message * * Global and synchronous — set it before mounting (or before validating on * the server). Components read the catalog at render time. */ export declare function setLocale(locale: Locale, overrides?: Partial): void; /** * Snapshot of the active catalog. The catalog is module-global — on a server * handling concurrent requests with different locales, wrap the locale switch: * snapshot, setLocale, do the synchronous work, then setCatalog the snapshot * back (bank20baht-validator's `locale` option does exactly this). */ export declare function getCatalog(): MessageCatalog; /** Restore a catalog snapshot taken with getCatalog(). */ export declare function setCatalog(catalog: MessageCatalog): void; /** Resolve one catalog string, interpolating `{param}` placeholders. */ export declare function t(key: MessageKey, params?: Record): string;