import { DecorationSet, ViewPlugin, ViewUpdate } from "@codemirror/view";
import { StateField, Extension } from "@codemirror/state";
import { SyntaxNode } from "@lezer/common";
import { ProjectionQuery } from "./query";
import { Diagnostic } from "@codemirror/lint";
export interface ProjectionProps {
    currentValue: any;
    cursorPositions: any[];
    diagnosticErrors: Diagnostic[];
    fullCode: string;
    keyPath: (string | number)[];
    node: SyntaxNode;
    setCode: (code: string) => void;
    typings: any[];
}
interface ProjectionBase {
    name: string;
    query: ProjectionQuery;
    projection: (props: ProjectionProps) => JSX.Element;
}
export interface ProjectionTooltip extends ProjectionBase {
    type: "tooltip";
    group: string;
    takeOverMenu?: boolean;
}
export interface ProjectionInline extends ProjectionBase {
    type: "inline";
    hasInternalState: boolean;
    mode: "replace" | "prefix" | "suffix" | "replace-multiline";
}
export interface ProjectionHighlight {
    type: "highlight";
    query: ProjectionQuery;
    class: string;
}
export declare type Projection = ProjectionInline | ProjectionTooltip | ProjectionHighlight;
export declare const getInUseRanges: (projectionsInUse: ProjectionMaterialization[]) => Set<`${number}-${number}`>;
export declare const projectionView: ViewPlugin<{
    decorations: DecorationSet;
    update(update: ViewUpdate): void;
}>;
declare type ProjectionMaterialization = {
    from: number;
    to: number;
    projection: Projection;
};
export interface ProjectionState {
    projectionsInUse: ProjectionMaterialization[];
}
export declare const projectionState: StateField<ProjectionState>;
export default function projectionPlugin(): Extension;
export {};
