import type { SourceFormat } from "../types/editor";
interface CodeEditorProps {
    /** The current source content to display. */
    content: string;
    /** Determines the Monaco language mode (`"xml"` for PreTeXt, `"latex"` for LaTeX). */
    sourceFormat: SourceFormat;
    /** Called (debounced 500 ms) whenever the user edits the content. */
    onChange: (value: string | undefined) => void;
    /** If provided, Ctrl+Enter in the editor triggers this callback. */
    onRebuild?: () => void;
    /** If provided, Ctrl+S in the editor triggers this callback. */
    onSave?: () => void;
    /** Called when the user clicks "Import LaTeX" in the toolbar. */
    onOpenLatexImport: () => void;
    /** Called when the user clicks "Edit Macros" in the toolbar. */
    onOpenDocinfoEditor: () => void;
    /**
     * If provided, a "Convert to PreTeXt" button is shown in the toolbar.
     * Called when the user clicks to open the conversion confirmation dialog.
     */
    onOpenConvertToPretext?: () => void;
    /**
     * Controls whether the "Convert to PreTeXt" button is enabled.
     * Should be `false` when conversion has failed.
     */
    canConvertToPretext?: boolean;
}
/**
 * Monaco-based code editor with an attached toolbar.
 *
 * Manages its own undo/redo state so the toolbar buttons stay in sync with
 * the editor model.  `onRebuild` and `onSave` callbacks are stored in refs
 * so keyboard shortcuts registered at mount time always call the latest
 * version without needing to re-register.
 *
 * Content is synced from props only when the prop value differs from what the
 * editor model already contains, to prevent cursor jumps on re-render.
 */
declare const CodeEditor: ({ content, sourceFormat, onChange, onRebuild, onSave, onOpenLatexImport, onOpenDocinfoEditor, onOpenConvertToPretext, canConvertToPretext, }: CodeEditorProps) => import("react/jsx-runtime").JSX.Element;
export default CodeEditor;
