import { Decoration, DecorationSet, EditorView, ViewPlugin, ViewUpdate } from "@codemirror/view";
import { NodeType, SyntaxNode } from "@lezer/common";
import { Range, EditorState } from "@codemirror/state";
declare type EventSubs = {
    [x: string]: (e: MouseEvent, view: EditorView) => any;
};
export interface SimpleWidget {
    checkForAdd: (type: NodeType, view: EditorView, currentNode: SyntaxNode) => boolean;
    addNode: (view: EditorView, from: number, to: number, currentNode: SyntaxNode) => Range<Decoration>[];
    eventSubscriptions: EventSubs;
}
export interface SimpleWidgetStateVersion {
    checkForAdd: (type: NodeType, state: EditorState, currentNode: SyntaxNode) => boolean;
    addNode: (state: EditorState, from: number, to: number, currentNode: SyntaxNode) => Range<Decoration>[];
    eventSubscriptions: EventSubs;
}
export declare const widgetsPlugin: ViewPlugin<{
    decorations: DecorationSet;
    update(update: ViewUpdate): void;
}>;
export {};
