import { DataRef } from '../../DataRef';
import { GraphNodeSpec, Specs } from '../../types';
import { Dict } from '../../types/Dict';
import { GraphSpec } from '../../types/GraphSpec';
import { GraphSelection, GraphSelectionData } from '../../types/interface/G';
import { IO } from '../../types/IO';
import { IOOf } from '../../types/IOOf';
import { Moves } from './buildMoves';
export type PinNodeSpec = {
    unitId: string;
    type: IO;
    pinId: string;
};
export type PlugNodeSpec = {
    type: IO;
    pinId: string;
    subPinId: string;
    template?: boolean;
};
export type UnitNodeSpec = {
    unitId: string;
    component?: {
        parentId?: string;
        parentIndex?: number;
        parentSlot?: string;
        children?: string[];
        childrenSlot?: Dict<string>;
        slot?: string;
    };
};
export type MergeNodeSpec = {
    mergeId: string;
};
export type DatumNodeSpec = {
    datumId: string;
    value: DataRef;
    attachedTo: GraphNodeSpec | null;
};
export type ErrNodeSpec = {
    unitId: string;
};
export type MoveUnitMap = {
    in?: {
        unit: UnitNodeSpec;
        merge?: Dict<MergeNodeSpec>;
        plug?: IOOf<Dict<PlugNodeSpec>>;
    };
    out?: {
        plug?: IOOf<Dict<PlugNodeSpec>>;
    };
};
export type MoveNodeMap = {
    in?: {
        unit?: UnitNodeSpec;
        merge?: MergeNodeSpec;
        plug?: IOOf<PlugNodeSpec>;
    };
    out?: {
        merge?: IOOf<MergeNodeSpec>;
    };
};
export type MoveMapping = {
    unit?: Dict<MoveUnitMap>;
    merge?: Dict<MoveNodeMap>;
    link?: Dict<IOOf<Dict<MoveNodeMap & {
        in?: {
            link?: {
                template: boolean;
            };
        };
    }>>>;
    plug?: IOOf<Dict<Dict<MoveNodeMap>>>;
};
export type MoveTask = {
    id: string;
    dependsOn: Set<string>;
    isDependencyOf: Set<string>;
    moves: Moves;
};
export type MoveMap = {
    source: GraphSpec;
    target: GraphSpec;
    mapping: MoveMapping;
    table: Dict<string>;
    tasks: Dict<MoveTask>;
};
export declare function buildMoveMap(specs: Specs, source: GraphSpec, target: GraphSpec, graphId: string, selection: GraphSelection, data?: GraphSelectionData, reverse?: boolean): MoveMap;
export declare function buildFullGraphSelection(specs: Specs, spec: GraphSpec): GraphSelection;
