import { Palette, Selection, SVGGlowFilter, SVGZoomWidget, ToggleButton, Utility, Widget } from "@hpcc-js/common";
import { Graph2 as GraphCollection } from "@hpcc-js/util";
import { HTMLTooltip } from "@hpcc-js/html";
import "d3-transition";
import { ILayout } from "./layouts/index.ts";
import { Options as FDOptions } from "./layouts/forceDirectedWorker.ts";
import type { BaseProps, VertexBaseProps, EdgeBaseProps, GraphDataProps, HierarchyBase, SubgraphBaseProps } from "./layouts/placeholders.ts";
import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder } from "./layouts/placeholders.ts";
import { Engine } from "./layouts/graphvizWorker.ts";
import "./graphT.css";
export { BaseProps, GraphDataProps, SubgraphBaseProps, VertexBaseProps, EdgeBaseProps, HierarchyBase };
type GraphLayoutType = "Hierarchy" | "DOT" | "Tree" | "Dendrogram" | "RadialTree" | "RadialDendrogram" | "ForceDirected" | "ForceDirected2" | "ForceDirectedHybrid" | "Neato" | "FDP" | "Circle" | "TwoPI" | "Circo" | "None";
export type RendererT<T> = (props: T, element: SVGGElement) => unknown;
export declare class GraphT<SG extends SubgraphBaseProps, V extends VertexBaseProps, E extends EdgeBaseProps<V>> extends SVGZoomWidget {
    protected _centroidFilter: SVGGlowFilter;
    private _toggleHierarchy;
    private _toggleForceDirected;
    private _toggleForceDirected2;
    private _toggleCircle;
    private _toggleDot;
    private _toggleNeato;
    private _toggleFDP;
    private _toggleTwoPI;
    private _toggleCirco;
    private _toggleT;
    private _toggleRT;
    private _toggleD;
    private _toggleRD;
    protected _graphData: GraphCollection<VertexPlaceholder<V>, EdgePlaceholder<V, E>, SubgraphPlaceholder<SG>>;
    protected _prevDoClickTime: number;
    protected _svgDefsAnn: any;
    protected _svgDefsCat: any;
    protected _subgraphG: Selection<SVGGElement, any, SVGGElement, any>;
    protected _edgeG: Selection<SVGGElement, any, SVGGElement, any>;
    protected _vertexG: Selection<SVGGElement, any, SVGGElement, any>;
    protected _tooltip: HTMLTooltip;
    protected _selection: Utility.SelectionBag;
    private _dragHandler;
    protected _catPalette: Palette.OrdinalPaletteFunc;
    _svgDefs: any;
    constructor(subgraphRenderer: RendererT<SG>, vertexRenderer: RendererT<V>, edgeRenderer: RendererT<E>);
    resolveEventOrigin(): {
        origin: string;
        data?: SG | V | E;
    };
    iconBarButtons(): Widget[];
    private _origData;
    data(): GraphDataProps<SG, V, E>;
    data(_: GraphDataProps<SG, V, E>, merge?: boolean): this;
    selected(vertex: V, _?: Array<V>): boolean;
    selection(_: Array<V | SG | E>): this;
    selection(): Array<V | SG | E>;
    graphData(): GraphCollection<VertexPlaceholder<V>, EdgePlaceholder<V, E>>;
    resetLayout(): this;
    layoutRunning(): boolean;
    protected _layoutAlgo: ILayout;
    layoutAlgo(layout: ILayout): Promise<void>;
    layoutClick(layout: GraphLayoutType): void;
    updateIconBarItem(tb: ToggleButton, tbLayout: GraphLayoutType): void;
    updateIconBar(): void;
    getNeighborMap(vertex: VertexPlaceholder<V>): {
        vertices: {};
        edges: {};
    };
    centerOnItem(id: string): void;
    hideVertex(id: string): this;
    showVertex(id: string): this;
    protected highlight: {
        zoom: number;
        opacity: number;
        edge: string;
    };
    highlightVerticies(vertexMap?: {
        [id: string]: boolean;
    }): this;
    highlightEdges(edgeMap?: {
        [id: string]: boolean;
    }): this;
    highlightVertex(_element: any, d?: VertexPlaceholder<V>): void;
    highlightEdge(_element: any, d?: EdgePlaceholder<V, E>): void;
    moveSubgraphPlaceholder(sp: SubgraphPlaceholder<SG>, transition: boolean): this;
    moveEdgePlaceholder(ep: EdgePlaceholder<V, E>, transition: boolean): this;
    moveVertexPlaceholder(vp: VertexPlaceholder<V>, transition: boolean, moveNeighbours: boolean): this;
    moveSubgraphs(transition: boolean): this;
    moveEdges(transition: boolean): this;
    moveVertices(transition: boolean): this;
    project(pos: number, clip?: boolean): number;
    rproject(pos: number): number;
    projectPlacholder(vp: VertexPlaceholder<V>): {
        x: number;
        y: number;
    };
    rprojectPlacholder(vp: VertexPlaceholder<V>): {
        x: number;
        y: number;
    };
    categoryID(id: string | number, prefix?: "cat" | "ann"): string;
    updateCategories(): void;
    updateAnnotations(): void;
    private _edgeRenderer;
    edgeRenderer(): RendererT<E>;
    edgeRenderer(_: RendererT<E>): this;
    updateEdges(): this;
    private _vertexRenderer;
    vertexRenderer(): RendererT<V>;
    vertexRenderer(_: RendererT<V>): this;
    vertexMapper(props: V, origRow: V): V;
    updateVertices(): this;
    calcProps(props: V): V;
    protected vertexAriaLabel(d: VertexPlaceholder<V>): string;
    hasSubgraphs(): boolean;
    private _subgraphRenderer;
    subgraphRenderer(): RendererT<SG>;
    subgraphRenderer(_: RendererT<SG>): this;
    updateSubgraphs(): this;
    enter(domNode: any, element: any): void;
    protected forceDirectedOptions(): FDOptions;
    private layoutOptions;
    private _prevLayout;
    updateLayout(): void;
    update(domNode: any, element: any): void;
    exit(domNode: any, element: any): void;
    render(callback?: (w: Widget) => void): this;
    private _prevWidth;
    private _prevHeight;
    private _prevTransformScale;
    private _transformScale;
    zoomed(transform: any): void;
    centroids(): VertexPlaceholder<V>[];
    selectionChanged(): void;
    tooltipHTML(data: any): any;
    subgraph_click(row: any, _col: any, sel: any): void;
    vertex_click(row: any, _col: any, sel: any, data: any): void;
    vertex_dblclick(row: any, _col: any, sel: any, data: any): void;
    vertex_contextmenu(row: any, _col: any, sel: any, data: any): void;
    vertex_mousein(row: any, _col: any, sel: any, data: any): void;
    vertex_mouseover(row: any, _col: any, sel: any, data: any): void;
    vertex_mouseout(row: any, _col: any, sel: any, data: any): void;
    edge_click(row: any, _col: any, sel: any): void;
    edge_mouseover(element: any, d: any): void;
    edge_mouseout(_element: any, _d: any): void;
    progress(what: "start" | "stop" | "layout-start" | "layout-tick" | "layout-stop"): void;
}
export interface GraphT<SG extends SubgraphBaseProps = any, V extends VertexBaseProps = any, E extends EdgeBaseProps<V> = any> {
    allowDragging(): boolean;
    allowDragging(_: boolean): this;
    dragSingleNeighbors(): boolean;
    dragSingleNeighbors(_: boolean): this;
    layout(): GraphLayoutType;
    layout(_: GraphLayoutType): this;
    applyScaleOnLayout(): boolean;
    applyScaleOnLayout(_: boolean): this;
    highlightOnMouseOverVertex(): boolean;
    highlightOnMouseOverVertex(_: boolean): this;
    highlightOnMouseOverEdge(): boolean;
    highlightOnMouseOverEdge(_: boolean): this;
    transitionDuration(): number;
    transitionDuration(_: number): this;
    highlightSelectedPathToCentroid(): boolean;
    highlightSelectedPathToCentroid(_: boolean): this;
    edgeArcDepth(): number;
    edgeArcDepth(_: number): this;
    minScale(): number;
    minScale(_: number): this;
    maxScale(): number;
    maxScale(_: number): this;
    showEdgeLabels(): boolean;
    showEdgeLabels(_: boolean): this;
    showEdgeLabelsOnHighlight(): boolean;
    showEdgeLabelsOnHighlight(_: boolean): this;
    showVertexLabels(): boolean;
    showVertexLabels(_: boolean): this;
    showVertexLabelsOnHighlight(): boolean;
    showVertexLabelsOnHighlight(_: boolean): this;
    tabNavigation(): boolean;
    tabNavigation(_: boolean): this;
    hierarchyRankDirection(): "TB" | "BT" | "LR" | "RL";
    hierarchyRankDirection(_: "TB" | "BT" | "LR" | "RL"): this;
    hierarchyNodeSeparation(): number;
    hierarchyNodeSeparation(_: number): this;
    hierarchyEdgeSeparation(): number;
    hierarchyEdgeSeparation(_: number): this;
    hierarchyRankSeparation(): number;
    hierarchyRankSeparation(_: number): this;
    hierarchyDigraph(): boolean;
    hierarchyDigraph(_: boolean): this;
    forceDirectedAlpha(): number;
    forceDirectedAlpha(_: number): this;
    forceDirectedAlphaMin(): number;
    forceDirectedAlphaMin(_: number): this;
    forceDirectedAlphaDecay(): number;
    forceDirectedAlphaDecay(_: number): this;
    forceDirectedRepulsionStrength(): number;
    forceDirectedRepulsionStrength(_: number): this;
    forceDirectedVelocityDecay(): number;
    forceDirectedVelocityDecay(_: number): this;
    forceDirectedIterations(): number;
    forceDirectedIterations(_: number): this;
    forceDirectedLinkDistance(): number;
    forceDirectedLinkDistance(_: number): this;
    forceDirectedLinkStrength(): number;
    forceDirectedLinkStrength(_: number): this;
    forceDirectedPinCentroid(): boolean;
    forceDirectedPinCentroid(_: boolean): this;
    forceDirectedForceStrength(): number;
    forceDirectedForceStrength(_: number): this;
    forceDirectedMinDistance(): number;
    forceDirectedMinDistance(_: number): this;
    forceDirectedMaxDistance(): number;
    forceDirectedMaxDistance(_: number): this;
    treeRankDirection(): "TB" | "LR";
    treeRankDirection(_: "TB" | "LR"): this;
    edgeColor(): string;
    edgeColor(_: string): this;
    edgeStrokeWidth(): number;
    edgeStrokeWidth(_: number): this;
    tooltipWidth(): number;
    tooltipWidth(_: number): this;
    tooltipHeight(): number;
    tooltipHeight(_: number): this;
    enableTooltipPointerEvents(): boolean;
    enableTooltipPointerEvents(_: boolean): this;
    tooltipCloseDelay(): number;
    tooltipCloseDelay(_: number): this;
    doubleClickMaxDelay(): number;
    doubleClickMaxDelay(_: number): this;
    wasmFolder(): string;
    wasmFolder(_: string): this;
}
export declare function graphviz(dot: string, engine?: Engine, _scriptDir?: string): {
    terminate: () => any;
    response: Promise<string>;
};
