import type { ComputedRef, Ref } from 'vue';
import type { ShortcutManager } from '../../manager/business/shortcut-manager';
import type { IShortcut } from '../../manager/business/types';
import type { IChatHelper } from '../../types';
import type { ChatBotProps } from '../types';
import type { ChatBotEmitFn } from './use-chatbot-init';
import type { ISupportUpload, IUserMessage } from '@blueking/chat-helper';
import type { Shortcut } from '@blueking/chat-x';
export type DoSendMessageFn = (message: IUserMessage['content'], options?: {
    property?: Record<string, unknown>;
}) => Promise<void>;
export interface UseShortcutsParams {
    chatHelper: Ref<IChatHelper | null>;
    doSendMessage: DoSendMessageFn;
    emit: ChatBotEmitFn;
    props: ChatBotProps;
    selectedShortcut: Ref<null | (Shortcut & {
        supportUpload?: ISupportUpload;
    })>;
    shortcutManager: Ref<null | ShortcutManager>;
}
export interface UseShortcutsReturn {
    effectiveShortcuts: ComputedRef<IShortcut[]>;
    buildShortcutProperty: (shortcut: Shortcut, formModel: Record<string, unknown>) => Record<string, unknown>;
    getShortcutFromMessage: (message: any) => IShortcut | null;
    handleCloseShortcut: () => void;
    handleSelectShortcut: (shortcut: Shortcut, text?: string) => void;
    handleShortcutSubmit: (formModel: Record<string, unknown>) => Promise<void>;
    selectShortcutWithText: (shortcut: IShortcut | Shortcut, text?: string) => void;
    /**
     * 直接发送快捷指令（跳过表单，等价于旧版 handleShortcutClick(_, true)）
     * 从 shortcut.components 的 default 值构建 formModel，直接发送消息
     * @param shortcut 快捷指令对象
     * @param selectedText 选中的文本（可选，用于填充到 fillBack 字段）
     */
    sendShortcutDirectly: (shortcut: IShortcut | Shortcut, selectedText?: string) => Promise<void>;
}
export declare function useShortcuts(params: UseShortcutsParams): UseShortcutsReturn;
//# sourceMappingURL=use-shortcuts.d.ts.map