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;
    readonly 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;
    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[];
    readonly nodes: FlowTreeNode[];
    index?: number;
    constructor(id: string, version: string, children: FlowTreeNode[]);
}
