import { Extension } from "@codemirror/state";
import { EditorView, ViewUpdate } from "@codemirror/view";
import type { CursorPosition } from "../code-editor";
type Props = {
    autoFocus?: boolean;
    customExtensions?: Extension[];
    lineWrapping?: boolean;
    onChange?: (value: string, viewUpdate: ViewUpdate) => void;
    onCursorChange?: (position: CursorPosition) => void;
    onEditorUpdate?: (update: ViewUpdate) => void;
    onFormat?: (formattedCode: string) => void;
    onSelectionChange?: (characterCount: number) => void;
    readonly?: boolean;
    value?: string;
};
export declare function useCodeEditor(props: Props): {
    containerRef: import("react").RefObject<HTMLDivElement>;
    editorViewRef: import("react").MutableRefObject<EditorView | null>;
    getCursorPosition: () => CursorPosition | null;
    getSelectedCharacterCount: () => number;
};
export {};
