import React from 'react';
import type { MarkdownEditorInstance } from '../../MarkdownEditor';
import type { AttachmentFile } from '../AttachmentButton/types';
import type { MarkdownInputFieldProps } from '../types/MarkdownInputFieldProps';
interface UseSendHandlerParams {
    props: Pick<MarkdownInputFieldProps, 'disabled' | 'typing' | 'onChange' | 'onSend' | 'allowEmptySubmit'>;
    /** 来自 SendButton 的可选额外禁用，独立于 props.disabled */
    sendDisabled?: boolean;
    markdownEditorRef: React.MutableRefObject<MarkdownEditorInstance | undefined>;
    /** 防止快速连续触发 onSend；keyboard / 按钮共用 */
    isSendingRef: React.MutableRefObject<boolean>;
    isLoading: boolean;
    setIsLoading: (loading: boolean) => void;
    value: string;
    setValue: (value: string) => void;
    setFileMap?: (fileMap?: Map<string, AttachmentFile>) => void;
    /** 录音中触发发送时需要先停止录音 */
    recording: boolean;
    stopRecording: () => Promise<void>;
}
/**
 * 发送消息处理 Hook。
 *
 * 由原 useMarkdownInputFieldHandlers 拆分而来，专门负责：
 *  - 多重发送守卫（disabled / typing / isLoading / isSendingRef / sendDisabled）
 *  - 录音状态下先停止再发送
 *  - 调用 onSend、清空内容、清空 fileMap、维护 isLoading
 *  - 处理 onSend 抛错时的 console + rethrow
 */
export declare const useSendHandler: ({ props, sendDisabled, markdownEditorRef, isSendingRef, isLoading, setIsLoading, value, setValue, setFileMap, recording, stopRecording, }: UseSendHandlerParams) => {
    sendMessage: () => Promise<void>;
};
export {};
