import { MessageDescriptor } from "react-intl"; /** * Returns the translation for the first match, either `propLabel` or `message`. * Note: This function should be called in React context. * * @param propLabel - A string or undefined: * * - If set to "" (empty string): "" is returned. * - If set to any other string: a `MessageDescriptor` is created dynamically * and formated using `intl.formatMessage()`. * - if set to `undefined`: `message` is used as fallback and passed to * `intl.formatMessage()`. * * @param message - A `MessageDescriptor` to use when `propLabel` is `undefined`. * @param context - Values to pass to `intl.formatMessage()`. */ export declare function gettextFirst(propLabel: string | undefined, message: MessageDescriptor, context?: object): string; /** * Returns the translation for `message` using `intl.formatMessage()`. * Not: This function should be called in React context. * * @param message - A `MessageDescriptor` to pass to `intl.formatMessage()`. * @param context - Values to pass to `intl.formatMessage()`. */ export declare function gettext(message: MessageDescriptor, context?: object): string; /** * Converts `context` (for use with `intl.formatMessage`) so that all values are * primitives. * * @param context - Key/value pairs to use in `formatMessage` calls. */ export declare function stringifyContext(context?: object): Record | undefined;