import { default as React } from 'react'; import { TediLabelEntryRecord, TediLabels, TediLabelValuesRecord, TediLanguage } from './labels-map'; export interface ILabelContext { getLabel ? FuncType extends (...args: infer P) => string ? P : [] : TediLabels[TKey] extends (...args: infer P) => string ? P : []>(key: TKey, ...args: TArgs): string; setLocale: (locale: TediLanguage) => void; /** * Currently active locale. Exposed so components can derive locale-sensitive * formatting defaults (e.g. `NumberField`'s `decimalSeparator`) without * forcing every consumer to repeat the prop on every instance. */ locale: TediLanguage; } export declare const LabelContext: React.Context; export interface LabelProviderProps = Record> { /** * Global labels that are use in components. If omitted then default labels are used based on `locale` prop. * If both props are omitted then English translations are used by default */ labels?: TRecord | TediLabelValuesRecord; /** * Currently used locale. Supported languages are:
* et - Estonian
* en - English
* ru - Russian * @default en */ locale?: TediLanguage; /** * Rest of the App code */ children: React.ReactNode; } export declare const LabelProvider: >(props: LabelProviderProps) => JSX.Element; export default LabelProvider;