import { ObjectUpdateType } from '../ObjectUpdateType';
import { Primitive, PrimitiveEvents } from '../Primitive';
import { State } from '../State';
import { System } from '../system';
import { Dict } from '../types/Dict';
import { J } from '../types/interface/J';
import { V } from '../types/interface/V';
import { Unlisten } from '../types/Unlisten';
import { ION, Opt } from './Unit';
export type Stateful_EE = {
    set: [string, any];
};
export type StatefulEvents<_EE extends Dict<any[]>> = PrimitiveEvents<_EE & Stateful_EE> & Stateful_EE;
export declare class Stateful<I = any, O = any, _J extends Dict<any> = {}, _EE extends StatefulEvents<_EE> = StatefulEvents<Stateful_EE>> extends Primitive<I, O, _EE> implements J, V {
    __: string[];
    stateful: boolean;
    protected _defaultState: State;
    protected _state: Dict<any>;
    constructor({ i, o }: ION<I, O>, opt: Opt, system: System, id: string);
    subscribe(path: string[], name: any, listener: (type: ObjectUpdateType, path: string[], key: string, data: any) => void): Unlisten;
    _set_from_input: boolean;
    onDataInputData(name: string, data: any): void;
    onDataInputDrop(name: string): void;
    onRefInputData(name: any, data: any): void;
    onRefInputDrop(name: any): void;
    get(name: string): Promise<any>;
    read(): Promise<any>;
    write(data: any): Promise<void>;
    set(name: string, data: any, auto?: boolean): Promise<void>;
    hasKey(name: string): Promise<boolean>;
    delete(name: string): Promise<void>;
    deepSet(path: string[], data: any): Promise<void>;
    deepGet(path: string[]): Promise<any>;
    deepDelete(path: string[]): Promise<void>;
    keys(): Promise<string[]>;
    snapshotSelf(): Dict<any>;
    restoreSelf(state: Dict<any>): void;
}
