import type { Editor } from "@tiptap/react";
import type { HeadingLevel, TextAlignValue, InsertTableOptions } from "@/core/commands/editorCommands";
import type { CommandItem } from "@/core/extensions/SlashCommands";
export interface UseEditorCommandsOptions {
    onOpenMathDialog?: (type: "inline" | "block", initialValue: string, callback: (latex: string) => void) => void;
    onOpenImageDialog?: (callback: (src: string, alt?: string) => void) => void;
    onOpenVideoDialog?: (callback: (src: string, title?: string) => void) => void;
    onOpenFileUploadDialog?: (callback: (url: string, name: string) => void) => void;
}
/**
 * 将 TipTap 编辑器的常用命令封装为 Hook，统一给工具栏 / 斜杠命令等调用。
 *
 * - 当 `editor` 为空时，返回的所有命令都会降级为 no-op，调用方无需到处判空。
 * - 通过 `options` 注入「打开图片 / 数学公式弹窗」的 UI 行为，实现逻辑与展示解耦。
 */
export declare function useEditorCommands(editor: Editor | null, options?: UseEditorCommandsOptions): {
    runFormat: (fn: () => void) => void;
    format: {
        toggleBold: () => void;
        toggleItalic: () => void;
        toggleUnderline: () => void;
        toggleStrike: () => void;
        toggleCode: () => void;
        setLink: (s: string) => void;
        unsetLink: () => void;
        toggleSuperscript: () => void;
        toggleSubscript: () => void;
        setTextAlign: (a: TextAlignValue) => void;
        setColor: (s: string) => void;
        unsetColor: () => void;
        setHighlight: (s: string) => void;
        unsetHighlight: () => void;
    };
    block: {
        setHeading: (level: HeadingLevel) => void;
        setParagraph: () => void;
        toggleHeading: (level: HeadingLevel) => void;
        toggleCodeBlock: () => void;
        toggleBlockquote: () => void;
        setCodeBlockLanguage: (s: string) => void;
        toggleBulletList: () => void;
        toggleOrderedList: () => void;
        toggleTaskList: () => void;
        increaseIndent: () => void;
        decreaseIndent: () => void;
        canIncreaseIndent: () => boolean;
        canDecreaseIndent: () => boolean;
        insertTable: (options?: InsertTableOptions) => void;
    };
    dialogs: {
        openInlineMath: () => void;
        openBlockMath: () => void;
        openImage: () => void;
        openVideo: () => void;
        openFileUpload: () => void;
    };
    runCommandItem: (item: CommandItem) => void;
};
