16 lines
698 B
TypeScript
16 lines
698 B
TypeScript
import type { BasePayload } from 'payload';
|
|
import type { NotificationTexts } from './types.js';
|
|
type GetNotificationTextsArgs = {
|
|
/** Active locale — selects the language variant of each text. */
|
|
locale?: string;
|
|
payload: BasePayload;
|
|
};
|
|
/**
|
|
* Resolves notification texts from the Notifications global, falling back to
|
|
* English defaults per field. Mirrors getConsentTexts: one read, per-field
|
|
* fallback, locale-aware. The frontend maps a submitForm result code to the
|
|
* matching text and styles it however it likes (toast, inline, banner).
|
|
*/
|
|
export declare function getNotificationTexts({ locale, payload, }: GetNotificationTextsArgs): Promise<NotificationTexts>;
|
|
export {};
|