import { ION, Opt, Unit, UnitEvents } from './Class/Unit';
import { Pin } from './Pin';
import { PinOpt } from './PinOpt';
import { System } from './system';
import { Dict } from './types/Dict';
import { Key } from './types/Key';
export type Primitive_EE = {};
export type PrimitiveEvents<_EE extends Dict<any[]>> = UnitEvents<_EE & Primitive_EE> & Primitive_EE;
export declare class Primitive<I extends Dict<any> = any, O extends Dict<any> = any, _EE extends PrimitiveEvents<_EE> & Dict<any[]> = PrimitiveEvents<Primitive_EE>> extends Unit<I, O, _EE> {
    protected _i: Partial<I>;
    _o_active: Set<Key>;
    _i_active: Set<Key>;
    _i_start: Set<Key>;
    _o_invalid: Set<keyof O>;
    _i_invalid: Set<keyof I>;
    _forwarding: boolean;
    _backwarding: boolean;
    _forwarding_empty: boolean;
    private _inputUnlisten;
    private _outputUnlisten;
    private __buffer;
    private _replaying;
    constructor({ i, o }: ION<I, O>, opt: Opt, system: System, id: string);
    getActiveInputCount(): number;
    getActiveOutputCount(): number;
    private _plunkOutput;
    private _plunkInput;
    private _setupInputs;
    private _setupDataInput;
    private _setupRefInput;
    private _setupInput;
    private _setupOutputs;
    private __setupOutput;
    private _setupDataOutput;
    private _setupRefOutput;
    private _setupOutput;
    private _onDataInputData;
    private _onRefInputData;
    private __onRefInputData;
    private _onInputSet;
    onInputSet<K extends keyof I>(name: K, input: Pin<any>, opt: PinOpt, propagate: boolean): void;
    private _onOutputSet;
    onOutputSet<K extends keyof O>(name: K, output: Pin<O[K]>, opt: PinOpt, propagate: boolean): void;
    private _onInputRemoved;
    onInputRemoved<K extends keyof I>(name: K, input: Pin<any>, propagate: boolean): void;
    _onOutputRemoved<K extends keyof O>(name: K, output: Pin<O[K]>, propagate: boolean): void;
    onOutputRemoved<K extends keyof O>(name: K, output: Pin<O[K]>, propagate: boolean): void;
    onDataInputData<K extends keyof I>(name: K, data: any): void;
    onRefInputData(name: any, data: any): void;
    private _onInputRenamed;
    private _onOutputRenamed;
    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;
    private _activateInput;
    private _deactivateInput;
    private _onDataInputDrop;
    private _onRefInputDrop;
    private __onRefInputDrop;
    private _onRefInputInvalid;
    onDataInputDrop<K extends keyof I>(name: K, data: any): void;
    onRefInputDrop<K extends keyof I>(name: K, data: any): void;
    private _activateOutput;
    private _deactivateOutput;
    private __onOutputData;
    private _onDataOutputData;
    private _onRefOutputData;
    private _onDataOutputDrop;
    private _onRefOutputDrop;
    onDataOutputData<K extends keyof O>(name: K, data: any): void;
    onDataOutputDrop<K extends keyof O>(name: K): void;
    onRefOutputData<K extends keyof O>(name: K, data: any): void;
    onRefOutputDrop<K extends keyof O>(name: K): void;
    onOutputInvalid(name: string): void;
    private _onOutputInvalid;
    private _onInputEnd;
    onDataInputEnd(name: string): void;
    private _onInputStart;
    onDataInputStart<K extends keyof I>(name: K): void;
    private _onDataInputInvalid;
    protected _start(): void;
    protected _invalidate(): void;
    protected _end(): void;
    protected _forward(name: string, data: any): void;
    protected _forward_(output: Pin, data: any): void;
    protected _forward_all_empty(): void;
    protected _forward_empty(name: keyof O): void;
    protected _backward_all(): void;
    protected _backward(name: keyof I): void;
    onDataInputInvalid<K extends keyof I>(name: K): void;
    onRefInputInvalid<K extends keyof I>(name: K): void;
    snapshotSelf(): Dict<any>;
    restoreSelf(state: Dict<any>): void;
}
