import React from 'react'; /** * 历史记录搜索组件属性接口 */ interface HistorySearchProps { /** 搜索关键词 */ searchKeyword?: string; /** 搜索回调函数 */ onSearch?: (value: string) => void; /** 历史记录类型 */ type?: 'chat' | 'task'; /** 搜索框配置 */ searchOptions?: { /** 搜索输入框 placeholder 文案 */ placeholder?: string; /** 未展开时的默认文本 */ text?: string; /** 搜索触发方式: 'change' - 实时搜索(默认), 'enter' - 回车触发 */ trigger?: 'change' | 'enter'; }; } /** * HistorySearch 组件 - 历史记录搜索组件 * * 该组件提供一个搜索输入框,用于搜索历史记录。 * 支持加载状态显示和错误处理。 * * @component * @description 历史记录搜索组件,用于搜索历史对话记录 * @param {HistorySearchProps} props - 组件属性 * @param {string} props.searchKeyword - 搜索关键词 * @param {(value: string) => void} props.onSearch - 搜索回调函数 * @param {boolean} [props.enabled=false] - 是否启用搜索功能 * * @example * ```tsx * handleSearch(value)} * enabled={true} * /> * ``` * * @returns {React.ReactElement|null} 渲染的搜索输入框组件,未启用时返回null * * @remarks * - 支持实时搜索 * - 包含加载状态显示 * - 支持清空输入 * - 包含错误处理机制 * - 响应式输入框设计 * - 条件渲染支持 * - 默认显示搜索图标,点击后展开搜索框 */ export declare const HistorySearch: React.FC; /** * @deprecated 请使用 HistorySearch 替代 */ export declare const SearchComponent: React.FC; export {};