import { AccessibilityProps, TokenContract } from '../shared/index.js';

type CodeEditorTheme = 'light' | 'dark';
interface CodeEditorProps {
    value?: string;
    onChange?: (value: string) => void;
    language?: string;
    readOnly?: boolean;
    theme?: CodeEditorTheme;
}
interface CodeEditorState {
    value: string;
    language: string;
    theme: CodeEditorTheme;
}
interface CodeEditorAPI {
    /** Current editor state */
    state: CodeEditorState;
    /** ARIA attributes for the editor element */
    ariaProps: Partial<AccessibilityProps> & {
        'aria-multiline'?: boolean;
    };
    /** Data attributes for CSS styling hooks */
    dataAttributes: Record<string, string>;
    /** Update the editor value */
    setValue: (value: string) => void;
    /** Get a human-readable label for the current language */
    getLanguageLabel: () => string;
}
/**
 * Create a headless code editor API.
 *
 * This provides the headless interface for a code editor — state management,
 * ARIA props, and data attributes. Actual rendering (Monaco, CodeMirror, or
 * a simple textarea) is handled by framework-specific wrappers.
 */
declare function createCodeEditor(props?: CodeEditorProps): CodeEditorAPI;

declare const codeEditorTokens: TokenContract;
declare const codeEditorVariants: (props?: ({
    theme?: "light" | "dark" | undefined;
    size?: "sm" | "default" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type CodeEditorAPI, type CodeEditorProps, type CodeEditorState, type CodeEditorTheme, codeEditorTokens, codeEditorVariants, createCodeEditor };
