import { ReactElement, ReactNode } from 'react'; import { UseTranslatableOptions, Record } from '../../features/core'; /** * Provides a way to show multiple languages for any field passed as children. * It expects the translatable values to have the following structure: * { * name: { * en: 'The english value', * fr: 'The french value', * tlh: 'The klingon value', * }, * description: { * en: 'The english value', * fr: 'The french value', * tlh: 'The klingon value', * } * } * * @example Basic usage * * * * * * @example With a custom language selector * } * locales={['en', 'fr']} * > * * > * * const MyLanguageSelector = () => { * const { * locales, * selectedLocale, * selectLocale, * } = useTranslatableContext(); * * return ( * * ); * } * * * @param props The component props * * @param {string} props.defaultLocale The locale selected by default. Default to 'en'. * * @param {string[]} props.locales An array of the possible locales in the form. For example [{ 'en', 'fr' }]. * * @param {ReactElement} props.selector The element responsible for selecting a locale. Defaults to Material UI tabs. */ export declare const TranslatableFields: (props: TranslatableFieldsProps) => ReactElement; export interface TranslatableFieldsProps extends UseTranslatableOptions { basePath?: string; children: ReactNode; record?: Record; resource?: string; selector?: ReactElement; groupKey?: string; }