import { Extension } from '@tiptap/core';
import type { Editor } from '@tiptap/react';
import { type LucideIcon } from 'lucide-react';
import type { EditorLocale } from '@/shared/locales';
export declare const BuiltinSlashCommandKey: {
    readonly Paragraph: "paragraph";
    readonly Heading1: "heading1";
    readonly Heading2: "heading2";
    readonly Heading3: "heading3";
    readonly Heading4: "heading4";
    readonly Heading5: "heading5";
    readonly Heading6: "heading6";
    readonly BulletList: "bulletList";
    readonly NumberedList: "numberedList";
    readonly TaskList: "taskList";
    readonly Blockquote: "blockquote";
    readonly InlineCode: "inlineCode";
    readonly CodeBlock: "codeBlock";
    readonly Table: "table";
    readonly InlineMath: "inlineMath";
    readonly BlockMath: "blockMath";
    readonly Image: "image";
    readonly Video: "video";
    readonly UploadAttachment: "uploadAttachment";
};
export type BuiltinSlashCommandKey = (typeof BuiltinSlashCommandKey)[keyof typeof BuiltinSlashCommandKey];
export declare const SlashCommandKey: {
    readonly Paragraph: "paragraph";
    readonly Heading1: "heading1";
    readonly Heading2: "heading2";
    readonly Heading3: "heading3";
    readonly Heading4: "heading4";
    readonly Heading5: "heading5";
    readonly Heading6: "heading6";
    readonly BulletList: "bulletList";
    readonly NumberedList: "numberedList";
    readonly TaskList: "taskList";
    readonly Blockquote: "blockquote";
    readonly InlineCode: "inlineCode";
    readonly CodeBlock: "codeBlock";
    readonly Table: "table";
    readonly InlineMath: "inlineMath";
    readonly BlockMath: "blockMath";
    readonly Image: "image";
    readonly Video: "video";
    readonly UploadAttachment: "uploadAttachment";
};
export type SlashCommandKey = (typeof SlashCommandKey)[keyof typeof SlashCommandKey];
export interface CommandItem {
    key: string;
    title: string;
    description?: string;
    /** 菜单分组，用于渲染分类标题。 */
    group?: string;
    icon?: LucideIcon;
    /** 文本型图标，用于标题等无对应统一 SVG 的命令。 */
    iconLabel?: string;
    command: ({ editor }: {
        editor: Editor;
    }) => void;
    mathType?: 'inline' | 'block';
    imageUpload?: boolean;
    /** Upload or insert video */
    videoUpload?: boolean;
    /** Upload attachment and insert file block link */
    fileAttachment?: boolean;
    /** 为 true 时在斜杠菜单中灰显，且方向键会跳过该项 */
    disabled?: boolean | ((ctx: {
        editor: Editor;
    }) => boolean);
}
export interface SlashCommandsOptions {
    onStart: () => void;
    onUpdate: (query: string, items?: CommandItem[]) => void;
    onIndexChange: (index: number) => void;
    onExit: () => void;
    onClientRect: (rect: DOMRect | null) => void;
    onCommand: (item: CommandItem) => void;
    onMathDialog?: (type: 'inline' | 'block', initialValue: string, callback: (latex: string) => void) => void;
    onImageUpload?: (callback: (src: string, alt?: string) => void) => void;
    onVideoUpload?: (callback: (src: string, title?: string) => void) => void;
    onFileUpload?: (callback: (url: string, name: string) => void) => void;
    locale: EditorLocale;
    getCommands?: () => CommandItem[];
    commands: CommandItem[];
}
/** 根据当前语言文案创建默认斜杠菜单项。 */
export declare function createDefaultCommands(locale: EditorLocale, defaultCodeBlockLanguage?: string): CommandItem[];
export declare const SlashCommands: Extension<SlashCommandsOptions, any>;
export default SlashCommands;
