import type { I18nResource, I18nToken, TemplateParams, I18nProxy } from "./types"; /** * Gets formatted translation text using a key/value token approach. * Useful for maintaining default values alongside translation keys. * @param token - Translation token containing `key` and optional default `text`. * @param params - Optional parameters for text interpolation. * @returns Formatted translation text. * @example * ```typescript * const token = { key: 'welcome.message', text: 'Welcome {{name}}!' }; * getI18nText(token, { name: 'John' }); // Returns translated or default text * ``` */ export declare const getI18nText: (token: I18nToken, params?: TemplateParams) => string; /** * Creates a Proxy-based translation resource accessor with support for chaining and function calls. * Provides automatic fallback to default resources when translations are missing. * @param defaultResource - Default translation object used as fallback. * @param namespace - Namespace prefix for resource isolation. * @param basePath - Optional base path for nested access within the namespace. * @returns A Proxy object that supports property chaining and function calls with parameters. * @example * ```typescript * const texts = createResourceProxy( * { buttons: { save: 'Save' } }, * 'myApp' * ); * texts.buttons.save(); // "Save" * texts.buttons.save({ name: 'John' }); // With parameter interpolation * texts.missing.key; // "missing key: [myApp.missing.key]" * ``` */ declare function createResourceProxy(defaultResource: Partial, namespace: string, basePath?: string): I18nProxy; /** * I18n utility functions for initialization, resource loading, and text formatting. */ declare const _default: { initialize: (key?: string) => void; loadResources: (res: string | string[]) => Promise; createResourceProxy: typeof createResourceProxy; formatText: (template: string, params?: TemplateParams) => string; }; export default _default;