import { Editor } from '@tiptap/react';
/** Toolbar item identifiers */
export type ToolbarItem = 'bold' | 'italic' | 'underline' | 'strike' | 'heading' | 'bulletList' | 'orderedList' | 'taskList' | 'codeBlock' | 'blockquote' | 'horizontalRule' | 'link' | 'image' | 'table' | 'subscript' | 'superscript' | 'math' | 'undo' | 'redo' | 'divider';
/** Math toolbar item identifiers */
export type MathToolbarItem = 'fraction' | 'sqrt' | 'power' | 'subscriptMath' | 'sum' | 'integral' | 'limit' | 'matrix' | 'symbols' | 'templates';
/** Education level for formula templates */
export type EducationLevel = 'sd' | 'smp' | 'sma' | 'all';
/** Output format */
export type OutputFormat = 'html' | 'json';
/** Toolbar density mode */
export type ToolbarMode = 'basic' | 'advanced' | 'olimpiade';
/** Main editor props */
export interface MathTextXEditorProps {
    /** Initial content (HTML string or TipTap JSON) */
    content?: string;
    /** Called when content changes — returns HTML string */
    onChange?: (html: string) => void;
    /** Called when user triggers save (Ctrl+S) */
    onSave?: (html: string) => void;
    /** Is the editor editable? */
    editable?: boolean;
    /** Placeholder text when editor is empty */
    placeholder?: string;
    /** Which toolbar items to show */
    toolbar?: ToolbarItem[];
    /** Preset toolbar density mode */
    toolbarMode?: ToolbarMode;
    /** Which math toolbar items to show */
    mathToolbar?: MathToolbarItem[];
    /** Education level for formula templates */
    templates?: EducationLevel;
    /** Output format */
    outputFormat?: OutputFormat;
    /** Custom class name for the editor container */
    className?: string;
    /** Minimum height of the editor */
    minHeight?: string;
    /** Maximum height of the editor (enables scrolling) */
    maxHeight?: string;
    /** Auto-focus the editor on mount */
    autoFocus?: boolean;
    /** Image upload handler — return the URL of the uploaded image */
    onImageUpload?: (file: File) => Promise<string>;
    /** Transform HTML before pasting — e.g. re-upload images in pasted content */
    onBeforePasteHTML?: (html: string) => Promise<string>;
}
/** Toolbar button config */
export interface ToolbarButtonConfig {
    id: ToolbarItem;
    icon: string;
    label: string;
    action: (editor: Editor) => void;
    isActive?: (editor: Editor) => boolean;
    isDisabled?: (editor: Editor) => boolean;
}
/** Math template */
export interface MathTemplate {
    id: string;
    label: string;
    latex: string;
    category: string;
    level: EducationLevel;
}
/** Symbol category */
export interface SymbolCategory {
    id: string;
    label: string;
    symbols: SymbolItem[];
}
/** Individual symbol */
export interface SymbolItem {
    char: string;
    label: string;
    latex: string;
}
