import { type Text, type Extension } from "@codemirror/state";
import { EditorView, type KeyBinding } from "@codemirror/view";
import { type LanguageDescription } from "@codemirror/language";
import { type I18n as TooltipPluginI18n } from "./plugins/tooltip";
import { type I18n as SlashPluginI18n } from "./plugins/slash";
interface I18n {
    tooltip?: Partial<TooltipPluginI18n>;
    slash?: Partial<SlashPluginI18n>;
    placeholder?: string;
}
export interface EditorConfig {
    root: Element | DocumentFragment | null;
    defaultValue?: string | Text;
    languages?: LanguageDescription[];
    themes?: Extension[];
    extensions?: Extension[];
    keymaps?: KeyBinding[];
    placeholder?: string;
    theme?: "system" | "light" | "dark";
    i18n?: I18n;
    onChange?: (value: string) => void;
}
export declare class MagicdownEditor {
    readonly EditorView: typeof EditorView;
    readonly root: Element | DocumentFragment | null;
    readonly defaultValue?: string | Text;
    extensions: Extension[];
    view?: EditorView;
    languages: LanguageDescription[];
    themes: Extension[];
    keymaps: KeyBinding[];
    i18n?: I18n;
    onChange?: (value: string) => void;
    status: "init" | "created" | "destroy";
    theme: "system" | "light" | "dark";
    private themeCompartment;
    static create(config: EditorConfig): Promise<MagicdownEditor>;
    constructor(config: EditorConfig);
    private isDark;
    private getThemeExtension;
    create(): Promise<void>;
    get value(): string;
    update(value: string): this;
    setTheme(theme: "system" | "light" | "dark"): Promise<void>;
    use(plugin: Extension | Extension[]): this;
    destroy(): void;
}
export { aiPlugin, type AIPluginConfig, type AIPluginI18n } from "./plugins/ai";
//# sourceMappingURL=index.d.ts.map