import { Pin } from '../../Pin';
import { PinOpt } from '../../PinOpt';
import { Primitive, PrimitiveEvents } from '../../Primitive';
import { System } from '../../system';
import { Dict } from '../../types/Dict';
import { ION, Opt } from '../Unit';
import { Done } from './Done';
import { Fail } from './Fail';
export type Functional_EE = {};
export type FunctionalEvents<_EE extends Dict<any[]>> = PrimitiveEvents<_EE & Functional_EE> & Functional_EE;
export type Functional_S = {
    _looping: boolean;
};
export type FunctionalState<T extends Omit<Dict<any>, keyof Functional_S> = {}> = T & Functional_S;
export declare class Functional<I extends Dict<any> = {}, O extends Dict<any> = {}, _EE extends FunctionalEvents<_EE> = FunctionalEvents<Functional_EE>> extends Primitive<I, O, _EE> {
    private _looping;
    constructor({ i, o }: ION<I, O>, opt: Opt, system: System, id: string);
    private _reset;
    private _on_input_data;
    private _on_input_drop;
    private _on_input_invalid;
    onDataInputData<K extends keyof I>(name: K): void;
    onDataInputDrop<K extends keyof I>(name: K, data: any): void;
    onDataInputStart<K extends keyof I>(name: K): void;
    onDataInputInvalid<K extends keyof I>(name: K): void;
    onDataInputEnd(name: string): void;
    onRefInputData(name: string): void;
    onRefInputDrop<K extends keyof I>(name: K, data: any): void;
    onRefInputInvalid<K extends keyof I>(name: K): void;
    private _on_data_output_drop;
    onDataOutputDrop<K extends keyof O>(name: K): void;
    onInputSet<K extends keyof I>(name: K, input: Pin<any>, opt: PinOpt, propagate: boolean): void;
    f(i: Partial<I>, done: Done<O>, fail: Fail): void;
    d(): void;
    b(): void;
    private _backward_if_ready;
    private _signal;
    private _forward_if_ready;
    protected _fail: (err: string) => void;
    _done: Done<O>;
    snapshotSelf(): any;
    restoreSelf(state: Dict<any>): void;
}
