import { Graph, NodeIdentifier } from '@api-client/graph';
import { EdgeConfig, NodeConfig, GraphLabel, RankDirOptions, AlignOptions, RankerOptions, AcyclicerOptions } from '@api-client/graph/src/layout/types';
import VizWorkspaceElement from '../../elements/VizWorkspaceElement.js';
export interface PositionedEdge {
    /**
     * The width of the label
     */
    width?: number;
    /**
     * The height of the label
     */
    height?: number;
    /**
     * The Id of the originating node
     */
    id: string;
    /**
     * The id of the target node
     */
    target: string;
    /**
     * Edge's weight, if possible to determine
     */
    weight?: number;
}
export interface PositionResult {
    id: NodeIdentifier;
    node: NodeConfig;
}
export interface PositioningResult {
    graph: Graph<GraphLabel, NodeConfig, EdgeConfig>;
    nodes: PositionResult[];
}
export declare enum LayoutWeight {
    External = 1,
    Internal = 10,
    Parent = 40,
    Self = 80
}
/**
 * A helper library that computes positioning of a data model
 * in the visualization workspace.
 */
export declare class WorkspaceLayout {
    workspace: VizWorkspaceElement;
    readPositions: Record<string, DOMRect>;
    /**
     * Direction for rank nodes. Can be TB, BT, LR, or RL, where T = top, B = bottom, L = left, and R = right.
     */
    rankDir?: RankDirOptions;
    /**
     * Alignment for rank nodes. Can be UL, UR, DL, or DR, where U = up, D = down, L = left, and R = right.
     */
    align?: AlignOptions;
    /**
     * Type of algorithm to assign a rank to each node in the input graph.
     */
    ranker?: RankerOptions;
    /**
     * If set to greedy, uses a greedy heuristic for finding a feedback arc set for a graph. A feedback arc set is a set of edges that can be removed to make a graph acyclic.
     */
    acyclicer?: AcyclicerOptions;
    /**
     * Number of pixels that separate edges horizontally in the layout.
     */
    edgeSeparation: number;
    /**
     * Number of pixels between each rank in the layout.
     */
    rankSeparation: number;
    /**
     * Number of pixels that separate nodes horizontally in the layout.
     */
    nodeSeparation: number;
    /**
     * Graph margin LR
     */
    marginX: number;
    /**
     * Graph margin TB
     */
    marginY: number;
    constructor(workspace: VizWorkspaceElement);
    /**
     * Reads workspace object dimensions
     * @param {string} id Domain id of the object
     * @returns {DOMRect}
     */
    readDimensions(id: string): DOMRect | undefined;
    initGraph(): Graph<GraphLabel, NodeConfig, EdgeConfig>;
}
//# sourceMappingURL=WorkspaceLayout.d.ts.map