/**
 * Copyright Aquera Inc 2023
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { CSSResultArray, TemplateResult, PropertyValueMap } from 'lit';
import { EditorView } from 'codemirror';
import { EditorState, Extension } from '@codemirror/state';
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
import NileElement from '../internal/nile-element';
/**
 * Nile icon component.
 *
 * @tag nile-code-editor
 *
 */
export declare class NileCodeEditor extends NileElement {
    codeEditor: HTMLInputElement;
    value: string;
    expandIcon: string;
    placeholder: string;
    customAutoCompletions: object | any;
    customCompletionsPaths: string[];
    language: 'javascript' | 'sql' | 'json' | 'html';
    errorMessage: string;
    error: boolean;
    enableSearch: boolean;
    noborder: boolean;
    multiline: boolean;
    enableFoldGutters: boolean;
    allowVariableInCustomSuggestion: boolean;
    lineNumbers: boolean;
    disableSyntaxHighlighting: boolean;
    customThemeCSS: object | null;
    lineNumbersMultiline: boolean;
    hasScroller: boolean;
    expandable: boolean;
    readonly: boolean;
    disabled: boolean;
    debounce: boolean;
    debounceTimeout: number;
    aboveCursor: boolean;
    tabCompletion: boolean;
    defaultFont: boolean;
    autoCompleteStyle: {
        width?: string;
        multiline?: boolean;
    } | undefined;
    hideReadOnlyCursor: boolean;
    view: EditorView;
    viewState: EditorState;
    private timeOut;
    private resizeObserver?;
    private lineNumbersComp;
    private restrictSingleLineComp;
    private readOnlyComp;
    private customCompletionComp;
    private placeholderComp;
    private defaultSyntaxHighlightingComp;
    private themeComp;
    private autoCompletionComp;
    private autoCompleteStyleComp;
    private isSpacePressed;
    /**
     * The styles for CodeEditor
     * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
     */
    static get styles(): CSSResultArray;
    connectedCallback(): void;
    disconnectedCallback(): void;
    firstUpdated(): void;
    getTabCompletionKeymap(): Extension;
    protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
    render(): TemplateResult;
    createNewView(emitEvent?: boolean): void;
    checkForSpaceKey(e: KeyboardEvent): void;
    closeCompletion(): void;
    handleEscapeKey(e: KeyboardEvent): void;
    createState(): EditorState;
    /**
     * Custom autocomplete handler for code editor suggestions
     * @param context CompletionContext from CodeMirror
     * @returns CompletionResult with suggestions or null if no suggestions
     */
    customAutocomplete: (context: CompletionContext) => CompletionResult | null;
    /**
     * Gets nested property suggestions based on the current path
     * @param context CompletionContext from CodeMirror
     * @param textBeforeCursor Text before cursor position
     * @param baseTextAfterSeperation Text after the last separator (. or [)
     * @returns CompletionResult with nested suggestions or null
     */
    getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string): {
        from: number;
        options: {
            label: string;
            type: string;
            info: string;
            apply: string;
            boost: number;
        }[];
    } | null;
    /**
     * Gets top level suggestions based on custom completions and paths
     * @param context CompletionContext from CodeMirror
     * @param textBeforeCursor Text before cursor position
     * @returns CompletionResult with top level suggestions or null
     */
    getTopLevelSuggestions(context: CompletionContext, textBeforeCursor: string): {
        from: number;
        options: {
            label: string;
            type: string;
            apply: string;
            boost: number;
        }[];
    } | null;
    emitAfterTimeout(value: any): void;
    focusAtPosition(pos?: number): void;
    insertBetweenCode: (text: string) => void;
    singleLineMultiLineToggle(): void;
    getLineNumbersExension(): Extension;
    getLanguageExtension(): Extension;
    getReadOnlyExtension(): Extension[];
    getSingleLineExtension(): Extension;
    getPlaceholderExtension(): Extension;
    getDefaultSyntaxHighlightingExtension(): Extension;
    getCustomThemeExtension(): Extension;
    getAutoCompleteStyleExtension(width?: number): Extension;
    private updateAutocompleteWidth;
    restrictSingleLine(): Extension;
}
export default NileCodeEditor;
declare global {
    interface HTMLElementTagNameMap {
        'nile-code-editor': NileCodeEditor;
    }
}
