import { Compartment, Extension, Facet, StateField } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { HighlightStyle } from "@codemirror/language";
import { VfsInterface } from "./types";
import { ExtensionOrLanguage } from "./lsps";
import { SearchIndex } from "./utils/search";
export type { CommandResult } from "./panels/toolbar";
export type CodeblockConfig = {
    fs: VfsInterface;
    cwd?: string;
    filepath?: string;
    content?: string;
    toolbar?: boolean;
    index?: SearchIndex;
    language?: ExtensionOrLanguage;
    dark?: boolean;
};
export type CreateCodeblockArgs = CodeblockConfig & {
    parent: HTMLElement;
    content?: string;
};
export declare const CodeblockFacet: Facet<CodeblockConfig, CodeblockConfig>;
export declare const configCompartment: Compartment;
export declare const languageSupportCompartment: Compartment;
export declare const languageServerCompartment: Compartment;
export declare const indentationCompartment: Compartment;
export declare const readOnlyCompartment: Compartment;
export declare const openFileEffect: import("@codemirror/state").StateEffectType<{
    path: string;
}>;
export declare const fileLoadedEffect: import("@codemirror/state").StateEffectType<{
    path: string;
    content: string;
    language: ExtensionOrLanguage | null;
}>;
export declare const setThemeEffect: import("@codemirror/state").StateEffectType<{
    dark: boolean;
}>;
export declare const currentFileField: StateField<{
    path: string | null;
    content: string;
    language: ExtensionOrLanguage | null;
    loading: boolean;
}>;
export declare const renderMarkdownCode: (code: any, parser: any, highlighter: HighlightStyle) => string;
export declare const codeblock: ({ content, fs, cwd, filepath, language, toolbar, index }: CodeblockConfig) => (Extension | StateField<import("./panels/toolbar").SearchResult[]> | StateField<{
    path: string | null;
    content: string;
    language: ExtensionOrLanguage | null;
    loading: boolean;
}>)[];
export declare const basicSetup: Extension;
export declare function createCodeblock({ parent, fs, filepath, language, content, cwd, toolbar, index, dark }: CreateCodeblockArgs): EditorView;
