import { Graph2 as GraphCollection } from "@hpcc-js/util";
import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder } from "./placeholders.ts";
import { EdgeLayout } from "./tree.ts";
export type Point = [number, number];
interface Position {
    x: number;
    y: number;
}
interface Line {
    source: Position;
    target: Position;
}
export interface ILayout {
    start(): Promise<this>;
    stop(): this;
    running(): boolean;
    edgePath(e: EdgePlaceholder, curveDepth: number): EdgeLayout;
}
export type Size = {
    width: number;
    height: number;
};
export interface IGraph {
    id(): string;
    size(): Size;
    graphData(): GraphCollection<VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder>;
    project(pos: number, clip?: boolean): any;
    rproject(pos: number): any;
    projectPlacholder(vp: VertexPlaceholder): any;
    rprojectPlacholder(vp: VertexPlaceholder): any;
    moveSubgraphs(transition: boolean): this;
    moveVertexPlaceholder(vp: VertexPlaceholder, transition: boolean, moveEdges: boolean): this;
    moveVertices(transition: boolean): this;
    moveEdgePlaceholder(ep: EdgePlaceholder, transition: boolean): this;
    moveEdges(transition: boolean): this;
    progress(what: "start" | "stop" | "layout-start" | "layout-tick" | "layout-stop"): any;
}
export declare class Layout implements ILayout {
    protected _graph: IGraph;
    protected _running: boolean;
    constructor(graph: IGraph);
    start(): Promise<this>;
    stop(): this;
    running(): boolean;
    protected center(points: Point[]): Point;
    vertexSize(vp: VertexPlaceholder): {
        width: number;
        height: number;
    };
    edgeLine(ep: EdgePlaceholder): Line;
    edgePath(ep: EdgePlaceholder, curveDepth: number): {
        path: string;
        labelPos: Point;
    };
}
export {};
