import { ModuleFlow } from '../models/module';
import { Reference } from '../models/reference';
export declare class FlowTree {
    readonly root: FlowTreeNode;
    readonly orphans: FlowTreeNode[];
    readonly flow: ModuleFlow;
    private _nodes;
    private _indexes;
    get depth(): number;
    get nodes(): FlowTreeNode[];
    constructor(flow: ModuleFlow);
    static encode(value: Reference): string;
    static encode(id: string, version: string): string;
    static decode(encoded: string): Reference;
    canLink(source: Reference, target: Reference, once?: boolean): boolean;
    getDepth(encoded: string): number;
    getDepth(id: string, version: string): number;
    getNode(encoded: string): FlowTreeNode | undefined;
    getNode(id: string, version: string): FlowTreeNode | undefined;
    getIndex(encoded: string): number;
    getIndex(id: string, version: string): number;
    getLabel(encoded: string): string;
    getLabel(id: string, version: string): string;
    add(target: Reference, id: string): ModuleFlow;
    delete(target: Reference): ModuleFlow;
    unlink(source: string, target: string): ModuleFlow;
    private parse;
    private parseChildren;
}
export declare class FlowTreeNode {
    readonly id: string;
    readonly version: string;
    readonly children: FlowTreeNode[];
    get depth(): number;
    get deepestPath(): FlowTreeNode[];
    get nodes(): FlowTreeNode[];
    index?: number;
    constructor(id: string, version: string, children: FlowTreeNode[]);
}
