import { jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { useCodemirror } from "./hooks/useCodemirror.js";
/**
 * @internal
 */
export function SyntaxHighlightingInput({ value, label, placeholder, autocompletion, onApi, onChange, onCursor, onKeyDown, onCompletion, onFocus, onBlur, className, beforeExtensions = [], extensions = [], disabled, }) {
    const { editorRef } = useCodemirror({
        placeholderText: placeholder,
        autocompletion,
        label,
        beforeExtensions,
        extensions,
        disabled,
        value,
        onCursor,
        onApi,
        onChange,
        onKeyDown,
        onCompletion,
        onFocus,
        onBlur,
    });
    return _jsx("div", { className: cx(className, "gd-input-syntax-highlighting-input"), ref: editorRef });
}
