import React from 'react'; import type { ReactNode, ComponentType } from 'react'; export type I18nMessageFormat = 'text' | 'html' | 'markdown' | 'component'; export interface I18nMessageProps { /** 翻译键 - 类型安全,与 @gulibs/vgrove-i18n 生成的类型兼容 */ id: Keys; /** 插值参数 - 支持嵌套对象 */ params?: Record; /** 默认值(当翻译不存在时使用) */ defaultValue?: string; /** 渲染格式 */ format?: I18nMessageFormat; /** 自定义渲染函数 */ render?: (text: string) => ReactNode; /** 包装元素 */ as?: keyof React.JSX.IntrinsicElements | ComponentType>; /** 自定义类名 */ className?: string; } /** * 国际化消息组件 * * 支持泛型语法: id="key" /> * * @example * // 基本使用 * * * // 带泛型类型约束 * id="home.title" /> * * // 带参数 * */ export declare const I18nMessage: ((props: I18nMessageProps) => React.ReactElement) & { displayName?: string; }; export declare const I18nTitle: ((props: Omit, "as" | "format"> & { level?: 1 | 2 | 3 | 4 | 5 | 6; }) => React.ReactElement) & { displayName?: string; }; export declare const I18nParagraph: ((props: Omit, "as" | "format">) => React.ReactElement) & { displayName?: string; }; export declare const I18nText: ((props: Omit, "as" | "format">) => React.ReactElement) & { displayName?: string; }; //# sourceMappingURL=I18nMessage.d.ts.map