/** * The language the widget speaks: the `locale` property, else the document's, * else the browser's. Everything locale-dependent — labels and timestamps * alike — goes through this, so they cannot disagree. * * @param {string | undefined} locale * @returns {string | undefined} undefined means "whatever the browser uses". */ export function resolveLocale(locale: string | undefined): string | undefined; /** * Pick the label set for a locale, falling back to English for anything we do * not ship. `overrides` is the host's `labels` property. * * @param {string | undefined} locale * @param {Partial | undefined} [overrides] * @returns {Labels} */ export function resolveLabels(locale: string | undefined, overrides?: Partial | undefined): Labels; export type Labels = { /** * Accessible name of the closed-state button. */ launcher: string; /** * Accessible name of the dialog. */ panel: string; /** * Accessible name of the message log. */ conversation: string; /** * Close button. */ close: string; /** * Home button: back to the start of the conversation. */ home: string; /** * Send button. */ send: string; /** * Attach button beside the composer. */ attach: string; /** * Composer textarea. */ input: string; /** * Announced while the other side is typing. */ typing: string; /** * Announced while waiting for an answer. */ loading: string; /** * The panel's drag handle. */ move: string; /** * "Jump to newest" button. */ toLatest: string; /** * Delivery state of one's own message. */ status: { sending: string; sent: string; error: string; }; /** * Counter, with {n} for the number remaining. */ charactersLeft: string; /** * Counter past the limit, with {n} for the excess. */ overLimit: string; };