import type MarkdownIt from 'markdown-it';
import { inputRules } from 'prosemirror-inputrules';
import type { Plugin } from 'prosemirror-state';
import type { Logger2 } from "../logger.js";
import type { ActionSpec } from "./types/actions.js";
import type { Extension, ExtensionDeps, ExtensionMarkSpec, ExtensionNodeSpec, ExtensionSpec, ExtensionWithOptions } from "./types/extension.js";
import type { Keymap } from "./types/keymap.js";
type InputRulesConfig = Parameters<typeof inputRules>[0];
type ConfigureMdParams = {
    /**
     * Apply this configurtion to text parser
     *
     * @default true
     */
    text?: boolean;
    /**
     * Apply this configurtion to markup parser
     *
     * @default true
     */
    markup?: boolean;
};
type ConfigureMdCallback = (md: MarkdownIt) => MarkdownIt;
type AddPmNodeCallback = () => ExtensionNodeSpec;
type AddPmMarkCallback = () => ExtensionMarkSpec;
type AddPmPluginCallback = (deps: ExtensionDeps) => Plugin | Plugin[];
type AddPmKeymapCallback = (deps: ExtensionDeps) => Keymap;
type AddPmInputRulesCallback = (deps: ExtensionDeps) => InputRulesConfig;
type AddActionCallback = (deps: ExtensionDeps) => ActionSpec;
declare enum Priority {
    Highest = 1000000,
    VeryHigh = 100000,
    High = 10000,
    Medium = 1000,
    Low = 100,
    VeryLow = 10,
    Lowest = 0
}
type BuilderContext<T extends object> = {
    has(key: keyof T): boolean;
    get<K extends keyof T>(key: K): T[K] | undefined;
    set<K extends keyof T>(key: K, value: T[K]): BuilderContext<T>;
};
declare global {
    namespace WysiwygEditor {
        interface Context {
        }
    }
}
export declare class ExtensionBuilder {
    #private;
    static createContext(): BuilderContext<WysiwygEditor.Context>;
    static readonly Priority: typeof Priority;
    readonly Priority: typeof Priority;
    readonly context: BuilderContext<WysiwygEditor.Context>;
    constructor(logger: Logger2.ILogger, context?: BuilderContext<WysiwygEditor.Context>);
    get logger(): Logger2.ILogger;
    use(extension: Extension): this;
    use<T>(extension: ExtensionWithOptions<T>, options: T): this;
    configureMd(cb: ConfigureMdCallback, params?: ConfigureMdParams): this;
    addNode(name: string, cb: AddPmNodeCallback): this;
    addMark(name: string, cb: AddPmMarkCallback, priority?: Priority): this;
    addPlugin(cb: AddPmPluginCallback, priority?: Priority): this;
    addKeymap(cb: AddPmKeymapCallback, priority?: Priority): this;
    addInputRules(cb: AddPmInputRulesCallback, priority?: Priority): this;
    addAction(name: string, cb: AddActionCallback): this;
    build(): ExtensionSpec;
}
export {};
