import { ObjectUpdateType } from '../../ObjectUpdateType';
import { Pin } from '../../Pin';
import { PinOpt } from '../../PinOpt';
import { System } from '../../system';
import { GraphPinsSpec, GraphPlugOuterSpec, GraphSubPinSpec, GraphUnitOuterSpec } from '../../types';
import { Action } from '../../types/Action';
import { BundleSpec } from '../../types/BundleSpec';
import { Continue } from '../../types/Continue';
import { Dict } from '../../types/Dict';
import { GraphMergeSpec } from '../../types/GraphMergeSpec';
import { GraphMergesSpec } from '../../types/GraphMergesSpec';
import { GraphPinSpec } from '../../types/GraphPinSpec';
import { GraphSpec } from '../../types/GraphSpec';
import { GraphUnitPlugs } from '../../types/GraphUnitPlugs';
import { GraphUnitSpec } from '../../types/GraphUnitSpec';
import { GraphUnitsSpec } from '../../types/GraphUnitsSpec';
import { IO } from '../../types/IO';
import { IOOf } from '../../types/IOOf';
import { UnitBundleSpec } from '../../types/UnitBundleSpec';
import { Unlisten } from '../../types/Unlisten';
import { AnimationSpec, C_EE } from '../../types/interface/C';
import { ComponentEvents, Component_ } from '../../types/interface/Component';
import { G, G_EE, G_MoveSubgraphIntoArgs } from '../../types/interface/G';
import { J } from '../../types/interface/J';
import { U, U_EE } from '../../types/interface/U';
import { Component__ } from '../Component';
import Merge from '../Merge';
import { SnapshotOpt, Unit, UnitEvents } from '../Unit';
export type Graph_EE = G_EE & C_EE & U_EE;
export type GraphEvents = UnitEvents<Graph_EE> & Graph_EE;
export declare class Graph<I extends Dict<any> = any, O extends Dict<any> = any> extends Component__<I, O, GraphEvents> implements G<I, O>, U<I, O>, J<Dict<any>> {
    __: string[];
    private _element;
    private _spec;
    private _unit;
    private _merge;
    private _pipedFrom;
    private _pipedTo;
    private _errUnitIds;
    private _pin;
    private _exposedPin;
    private _exposedMerge;
    private _exposedEmptySubPin;
    private _mergeToSelfUnit;
    private _selfUniToMerge;
    private _pinToMerge;
    private _branch;
    private _mergePinCount;
    private _unitToMerge;
    private _unitToMergeCount;
    private _waitAll;
    private _plugUnlisten;
    private _removingUnit;
    private _destroying;
    constructor(spec: GraphSpec, branch: Dict<true>, system: System, id?: string, push?: boolean);
    get<K extends string>(name: K): any;
    set<K extends string>(name: K, data: any): void;
    delete<K extends string>(name: K): void;
    hasKey<K extends string>(name: K): boolean;
    keys(): string[];
    deepGet(path: string[]): any;
    deepHas(path: string[]): boolean;
    deepSet(path: string[], data: any): void;
    deepDelete(path: string[]): Promise<void>;
    subscribe(path: string[], key: string, listener: (type: ObjectUpdateType, path: string[], key: string, data: any) => void): Unlisten;
    private _onPinSetRenamed;
    onInputRenamed<K extends keyof I>(name: K, newName: K, opt: PinOpt, newOpt: PinOpt): void;
    onOutputRenamed<K extends keyof O>(name: K, newName: K, opt: PinOpt, newOpt: PinOpt): void;
    isUnitPinConstant(unitId: string, type: IO, pinId: string): boolean;
    isUnitPinRef(unitId: string, type: IO, pinId: string): boolean;
    getUnitPinData(unitId: string, type: IO, pinId: string): any;
    removeUnitPinData(unitId: string, type: IO, pinId: string, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    removeMergeData(mergeId: string): void;
    setMergeData(mergeId: string, data: any): void;
    private _setMergeData;
    private _removeMergeData;
    private _plugToWaitAll;
    private _unplugFromWaitAll;
    private _getExposedSubPinNodeId;
    private _removeUnitPinData;
    private _setBranch;
    private _memSetBranch;
    private _simSetBranch;
    private _memRemoveBranch;
    private _simRemoveBranch;
    private _ensureMergePin;
    private _memRemoveMergeOutput;
    private _simRemoveMergeOutput;
    private _plugPinToMerge;
    private _simPlugPinToMerge;
    private _simUnplugPinFromMerge;
    private _simUnplugPinFromUnitPin;
    private _plugPinToUnitPin;
    private _memPlugPinToUnitPin;
    private _memPlugPinToMerge;
    private _simPlugPinToUnitPin;
    private _setExposedSubPin;
    private _memSetExposedSubPin;
    private _simSetExposedSubPin;
    private _simRemoveExposedSubPin;
    private _takeErr;
    private _nextErr;
    private _destroy;
    private _resetting;
    private _reset;
    private _play;
    private _pause;
    private _removeErrUnit;
    specHasMerge: (mergeId: string) => boolean;
    private _validateMergeId;
    private _validateUnitId;
    isElement(): boolean;
    setElement(): void;
    setNotElement(): void;
    getSpec(): GraphSpec;
    setSpec(spec: GraphSpec): void;
    getBundleSpec({ deep, system, state, metadata }?: SnapshotOpt): BundleSpec;
    getUnitBundleSpec({ deep, system, state, }?: SnapshotOpt): UnitBundleSpec;
    snapshotSelf(opt?: SnapshotOpt): Dict<any>;
    restoreSelf(state: Dict<any>): void;
    getGraphUnitSpec(id: string): GraphUnitSpec;
    getUnits(): Dict<Unit>;
    plugOutput(subPinId: string, subPin: GraphSubPinSpec, id: string): void;
    unplugOutput(subPinId: string, id: string): void;
    _unplugOutput(subPinId: string, id: string, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    isExposedOutput(pin: GraphSubPinSpec): boolean;
    getExposedOutput(pin: GraphSubPinSpec): string;
    exposeInputSets(inputs: GraphPinsSpec): void;
    private _exposeInputSets;
    private _initInputSets;
    private _initOutputSets;
    exposeInputSet(input: GraphPinSpec, pinId: string, data?: any): void;
    private _exposeInputSet;
    exposePinSet(type: IO, pinId: string, pinSpec: GraphPinSpec, data?: any, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    setUnitSize(unitId: string, width: number, height: number, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    setSubComponentSize(unitId: string, width: number, height: number, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    setComponentSize(unitId: string, width: number, height: number, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    _exposePinSet(type: IO, pinId: string, pinSpec: GraphPinSpec, data?: any, propagate?: boolean, fork?: boolean, bubble?: boolean): Continue;
    _initPinSet(type: IO, pinId: string, pinSpec: GraphPinSpec, propagate?: boolean): void;
    _specExposePinSet(type: IO, pinId: string, pinSpec: GraphPinSpec): void;
    private _memExposePinSet;
    private _simExposePinSet;
    isPinSetFunctional(type: IO, pinId: string): boolean;
    setPinSetFunctional(type: IO, pinId: string, functional: boolean, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _setPinSetFunctional;
    private _specSetPinSetFunctional;
    private _memSetPinSetFunctional;
    private _simSetPinSetFunctional;
    setPinSetDefaultIgnored(type: IO, pinId: string, defaultIgnored: boolean, fork?: boolean, bubble?: boolean): void;
    private _setPinSetDefaultIgnored;
    private _specSetPinSetDefaultIgnored;
    private _memSetPinSetDefaultIgnored;
    private _simSetPinSetDefaultIgnored;
    setPinSetId(type: IO, pinId: string, newPinId: string, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    _setPinSetId(type: IO, pinId: string, newPinId: string, fork: boolean, bubble: boolean): void;
    private _specSetPinSetId;
    exposePin(type: IO, pinId: string, subPinId: string, subPinSpec: GraphSubPinSpec, pinSpec?: GraphPinSpec, emit?: boolean, propagate?: boolean): void;
    private _exposePin;
    private _specExposePin;
    private _memExposePin;
    private _simExposePin;
    coverInputSet(id: string): void;
    coverInput(subPinId: string, id: string): void;
    coverPinSet(type: IO, id: string, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    private _coverPinSet;
    private _memCoverPinSet;
    private _specCoverPinSet;
    private _simCoverPinSet;
    private _specSetPinRef;
    private _memPlugPin;
    private _specPlugPin;
    plugPin(type: IO, pinId: string, subPinId: string, subPinSpec: GraphSubPinSpec, data: any, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    private _memRemoveEmptyPin;
    private _simUnplugPinFromEmpty;
    private _plugPin;
    isRefMerge(mergeId: string): boolean;
    edit(event: keyof G_EE, ...args: any[]): void;
    private _simPlugPin;
    plugInput(subPinId: string, subPin: GraphSubPinSpec, id: string): void;
    unplugInput(subPinId: string, id: string, propagate?: boolean): void;
    coverPin(type: IO, pinId: string, subPinId: string, propagate?: boolean, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _coverPin;
    private _specCoverPin;
    private _memCoverPin;
    private _simCoverPin;
    getSubPinSpec(type: IO, pinId: string, subPinId: string): GraphSubPinSpec;
    unplugPin(type: IO, pinId: string, subPinId: string, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    private _unplugPin;
    private _specUnplugPin;
    private _memUnplugPin;
    private _ensureEmptySubPin;
    private _memPlugEmptyPin;
    private _simUnplugPin;
    private __simUnplugPin;
    isPinRef(type: IO, pinId: any): boolean;
    private _simPlugEmptyPin;
    isExposedInput(pin: GraphSubPinSpec): boolean;
    getExposedPin<T extends IO, K extends T extends 'input' ? keyof I : keyof O>(type: T, id: K): Pin;
    getExposedInputPin<K extends keyof I>(id: K): Pin<I[K]>;
    getExposedOutputPin<K extends keyof O>(id: K): Pin<O[K]>;
    getExposedPinSpecs(): IOOf<GraphPinsSpec>;
    getExposedPinSpec<T extends IO, K extends T extends 'input' ? keyof I : keyof O>(type: T, pinId: K): GraphPinSpec;
    isExposedInputPinId(pinId: string): boolean;
    isExposedOutputPinId(pinId: string): boolean;
    getExposedInputSpec<K extends keyof I>(pinId: K): GraphPinSpec;
    getPlugSpec(type: IO, pinId: string, subPinId: string): GraphPinSpec;
    getExposedInputSpecs(): GraphPinsSpec;
    getExposedOutputSpec<K extends keyof O>(pinId: K): GraphPinSpec;
    getExposedOutputSpecs(): GraphPinsSpec;
    hasUnit(unitId: string): boolean;
    hasMerge(mergeId: string): boolean;
    hasMergePin(mergeId: string, unitId: string, type: IO, pin_id: string): boolean;
    hasPlug(type: IO, pinId: string, subPinId: string): boolean;
    getUnit(unitId: string): Unit<any, any>;
    getSubComponent(unitId: string): Component_<any>;
    getGraph(unitId: string): Graph;
    getUnitOuterSpec(unitId: string): GraphUnitOuterSpec;
    getUnitByPath(path: string[]): Unit<any, any>;
    getGraphChildren(): Dict<any>;
    getUnitPin(unitId: string, type: IO, pinId: string): Pin;
    getUnitData(unitId: string, type: IO, pinId: string): {
        input: Dict<any>;
        output: Dict<any>;
    };
    getMergeData(mergeId: string): any;
    getUnitInput(unitId: string, pinId: string): Pin;
    getUnitOutput(unitId: string, pinId: string): Pin;
    setUnitErr(unitId: string, err: string): void;
    takeUnitErr(unitId: string): string | null;
    private _takeUnitErr;
    getGraphPinData(): object;
    getGraphMergeInputData(): Dict<any>;
    getGraphErr(): Dict<string | null>;
    getUnitInputData(unitId: string): Dict<any>;
    getMerges(): Dict<Merge>;
    refPins(): IOOf<Dict<Pin>>;
    getPlugs(): IOOf<Dict<Dict<Pin>>>;
    getPlugSpecs(): IOOf<Dict<Dict<GraphSubPinSpec>>>;
    getPlug(type: IO, pinId: string, subPinId: string): Pin;
    getMerge(mergeId: string): Merge;
    refExposedMerges(): IOOf<Dict<Merge>>;
    getUnitCount(): number;
    getMergeCount(): number;
    findMergeExposedSubPin(type: IO, mergeId: string): GraphPlugOuterSpec | null;
    getUnitsSpec(): GraphUnitsSpec;
    getMergesSpec(): GraphMergesSpec;
    getMergeSpec(mergeId: string): GraphMergeSpec;
    getMergeUnitCount(mergeId: string): number;
    getMergePinCount(mergeId: string): number;
    getPinPlugCount(type: IO, pinId: string): number;
    addUnit(unitId: string, unit: Unit, bundle?: UnitBundleSpec, parentId?: string | null, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    setFork(fork: boolean): void;
    fork(specId?: string, emit?: boolean, bubble?: boolean): void;
    private _fork;
    private _initUnit;
    private _initUnits;
    private _addUnit;
    private injectSubComponent;
    private _simInjectSubComponent;
    private _injectSubComponent;
    private _specInjectSubComponent;
    private _specAppendRoot;
    private _specRemoveSubComponent;
    private _getSubComponentParentId;
    private _getSubComponentParentIndex;
    private _getSubComponentSlotName;
    private _appendSubComponentChild;
    private _insertSubComponentChild;
    private _simRemoveSubComponentFromParent;
    private _specRemoveSubComponentChild;
    private _specRemoveSubComponentFromParent;
    private _simSubComponentRemoveChild;
    private _specSubComponentAppendChild;
    private _specSubComponentInsertChild;
    private _simSubComponentAppendChild;
    private _simSubComponentInsertChild;
    private _unitUnlisten;
    addUnitSpec(unitId: string, bundle: UnitBundleSpec, parentId?: string | null, emit?: boolean, fork?: boolean, bubble?: boolean): Unit;
    private _addUnitSpec;
    _addUnitBundleSpec(unitId: string, bundle: UnitBundleSpec): Unit;
    private _onUnitErr;
    private _specAddUnit;
    private setUnitPin;
    private setUnitInput;
    private setUnitOutput;
    private _bubble;
    private _unitBubble;
    setParent(parent: Unit | null, bubble: (event: keyof G_EE, ...data: any[]) => void): void;
    removeParent(): void;
    private _memAddUnit;
    private _simAddUnit;
    private _onUnitElement;
    private _onUnitNotElement;
    removeUnit(unitId: string, emit?: boolean, propagate?: boolean, destroy?: boolean, fork?: boolean, bubble?: boolean): Unit;
    private _memRemoveUnitFromMerges;
    private _simRemoveUnitFromMerges;
    private _removeUnitFromMerge;
    private _memRemoveUnitFromMerge;
    private _simRemoveUnitFromMerge;
    private _specRemoveUnitFromMerge;
    private _forEachUnitPinOnMerge;
    private _removeUnit;
    private _specRemoveUnit;
    private _memRemoveUnit;
    private _simRemoveUnit;
    private _specUnplugUnit;
    private _simUnplugUnit;
    private _addUnitMerges;
    private _initMerges;
    private _initMerge;
    addMerge(mergeSpec: GraphMergeSpec, mergeId: string, emit?: boolean, propagate?: boolean, fork?: boolean): void;
    private _memUnplugUnit;
    private _createMerge;
    private _pinToPlug;
    private _addMerge;
    private _specAddMerge;
    private _memAddMerge;
    private _simAddMerge;
    private _simAddPinToMerge;
    private _specAddPinToMerge;
    private _memAddPinToMerge;
    private _memRemoveMerge;
    private _specRemoveMerge;
    private _memRemoveAllMergePlug;
    private _specRemoveAllMergePlug;
    private _memRemoveAllMergeRef;
    private _memRemoveAllMergePin;
    private _specRemoveAllMergePin;
    private _memPostRemoveMerge;
    memIsUnitRefPin(unitId: string, type: IO, pinId: string): boolean;
    private _getUnitSpec;
    private getUnitSpecId;
    private getUnitSpec;
    isUnitRefPin(unitId: string, type: IO, pinId: string): boolean;
    isUnitRefInput(unitId: string, pinId: string): boolean;
    addPinToMerge(mergeId: string, unitId: string, type: IO, pinId: string, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    private _addPinToMerge;
    removeMerge(mergeId: string, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    _removeMerge(mergeId: string, propagate?: boolean, fork?: boolean, bubble?: boolean): Merge;
    private _simRemoveMerge;
    private _simRemoveAllPlugsFromMerge;
    private _forEachSpecPinPlug;
    private _forEachSpecPinOfType;
    private _simRemoveAllPinsFromMerge;
    removePinFromMerge(mergeId: string, unitId: string, type: IO, pinId: string, emit?: boolean, propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    private _removePinFromMerge;
    removePinOrMerge(mergeId: string, unitId: string, type: IO, pinId: string, emit?: boolean, propagate?: boolean): void;
    private _removePinOrMerge;
    private _memRemovePinFromMerge;
    private _specRemovePinFromMerge;
    private _simRemovePinFromMerge;
    isPinMergedTo(mergeId: string, unitId: string, type: IO, pinId: string): any;
    setUnitPinSetId(unitId: string, type: IO, pinId: string, newPinId: string, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _setUnitPinSetId;
    setUnitPinConstant(unitId: string, type: IO, pinId: string, constant: boolean, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _setUnitPinConstant;
    private _specSetUnitPinConstant;
    setUnitInputConstant(unitId: string, pinId: string, constant: boolean): void;
    setUnitOutputConstant(unitId: string, pinId: string, constant: boolean): void;
    setUnitInputIgnored(unitId: string, pinId: string, ignored: boolean): void;
    setUnitOutputIgnored(unitId: string, pinId: string, ignored: boolean): void;
    setUnitPinIgnored(unitId: string, type: IO, pinId: string, ignored: boolean, fork?: boolean, bubble?: boolean): void;
    private _setUnitPinIgnored;
    private _specSetUnitPinIgnored;
    private _simSetUnitPinIgnored;
    setUnitId(unitId: string, newUnitId: string, name: string, specId: string): void;
    setName(name: string, emit?: boolean, fork?: boolean): void;
    private _setName;
    private _specSetName;
    _setUnitId(unitId: string, newUnitId: string, name: string, specId: string): void;
    private _addUnitPlugs;
    setPlugData(type: IO, pinId: string, subPinId: string, data: any, propagate?: boolean): void;
    private _noFork;
    setUnitPinData(unitId: string, type: IO, pinId: string, data: any, propagate?: boolean, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _setUnitPinData;
    private _specSetUnitPinData;
    private _simSetUnitPinData;
    setUnitInputData(unitId: string, pinId: string, data: any): void;
    setUnitOutputData(unitId: string, pinId: string, data: any): void;
    setMetadata(path: string[], data: any): void;
    private _setMetadata;
    setUnitMetadata(unitId: string, path: string[], data: any): void;
    private _setUnitMetadata;
    setUnitPinMetadata(unitId: string, type: IO, pinId: string, path: string[], data: any): void;
    private _setUnitPinMetadata;
    setPinMetadata(type: IO, pinId: string, path: string[], data: any): void;
    private _setPinMetadata;
    getSubComponentsParentMap(sub_component_ids: string[]): Dict<string | null>;
    getSubComponentsSlotMap(sub_component_ids: string[]): Dict<string | null>;
    moveSubComponentRoot(subComponentId: string | null, children: string[], slotMap?: Dict<string>, index?: number, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _specRemoveRoot;
    private _simRemoveRoot;
    moveSubgraphInto(...[graphId, specId, selection, map, moves, emit, fork, bubble,]: G_MoveSubgraphIntoArgs): void;
    private _moveSubgraphInto;
    getUnitMergesSpec(unitId: string): GraphMergesSpec;
    getPinMergeId(unitId: string, type: IO, pinId: string): string | null;
    getUnitPlugsSpec(unitId: string): GraphUnitPlugs;
    private _isUnitComponent;
    moveSubgraphOutOf(...[graphId, spec, selection, map, moves, emit, fork, bubble,]: G_MoveSubgraphIntoArgs): void;
    private _moveSubgraphOutOf;
    getGraphUnitBundleSpec(graphId: string): BundleSpec;
    getGraphUnitGraphSpec(graphId: string): GraphSpec;
    getGraphUnitUnitBundleSpec(graphId: string): UnitBundleSpec;
    private _removeSubComponentFromParent;
    removeRoot(subComponentId: string, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _removeRoot;
    reorderSubComponent(parentId: string | null, childId: string, to: number, emit?: boolean, fork?: boolean, bubble?: boolean): void;
    private _reorderSubComponent;
    private _simReorderSubComponent;
    private _specReorderSubComponent;
    moveRoot(parentId: string | null, childId: string, to: number, slotName: string, fork?: boolean, bubble?: boolean): void;
    private _moveSubComponentRoot;
    private _initSetComponent;
    private _initAddSubComponent;
    private _slot_name;
    reorderRoot(component: Component_<ComponentEvents>, to: number, emit?: boolean): void;
    reorderParentRoot(component: Component_<ComponentEvents>, to: number, emit?: boolean): void;
    refSlot(slotName: string): Component_;
    setSlot(slotName: string, subComponentId: string): void;
    getSlot(slotName: string): string;
    getAnimations(): AnimationSpec[];
    bulkEdit(actions: Action[], propagate?: boolean, fork?: boolean, bubble?: boolean): void;
    act(action: Action, fork: boolean, bubble: boolean, propagate: boolean): void;
    private _bulkEdit;
    private _setUnitSize;
    private _specSetUnitSize;
    private _setSubComponentSize;
    private _specSetSubComponentSize;
    private _setComponentSize;
    private _specSetComponentSize;
}
