import type { ApplyTarget, ConstrainTarget, GetSource, i18n, Namespace, SelectorFn, TFunction, TOptions } from 'i18next'; import type { ComponentType, HTMLProps, JSX, ReactNode } from 'preact/compat'; import { useTranslation as i18nUseTranslation } from 'react-i18next'; import type { _DefaultNamespace, _EnableSelector, $NoInfer, TransLegacy } from 'react-i18next/TransWithoutContext'; export declare const useTranslation: typeof i18nUseTranslation; /** * Modified to use Preact element types instead of React */ interface TransSelector { , Key extends SelectorFn, KPrefix>, ApplyTarget, TOpt>, const Ns extends Namespace = _DefaultNamespace, KPrefix = undefined, TContext extends string | undefined = undefined, TOpt extends TOptions & { context?: TContext; } = { context: TContext; }, E = HTMLProps>(props: TransSelectorProps & E): JSX.Element; } type TransChild = ReactNode | Record; /** * Modified to use Preact element types instead of React */ interface TransSelectorProps { children?: TransChild | readonly TransChild[]; components?: readonly JSX.Element[] | { readonly [tagName: string]: JSX.Element; }; count?: number; context?: TContext; defaults?: string; i18n?: i18n; i18nKey?: Key; ns?: Ns; parent?: string | ComponentType | null; tOptions?: TOpt; values?: {}; shouldUnescape?: boolean; t?: TFunction; } export declare const Trans: _EnableSelector extends true | "optimize" ? TransSelector : TransLegacy; export declare const addResourceBundles: (i18n: i18n, resourceDetails: { ns: Namespace; importFn: (lang: string) => Promise<{ default: Record; }>; }[]) => void; export {};