import { ObjectUpdateType } from '../Object';
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 declare type Stateful_EE = {
    set: [string, any];
};
export declare 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, opt: Opt, system: System, id: string);
    subscribe(path: string[], name: any, listener: (type: ObjectUpdateType, path: string[], key: string, data: any) => void): Unlisten;
    onDataInputData(name: string, data: any): void;
    onDataInputDrop(name: string): void;
    get(name: string): Promise<any>;
    read(): Promise<any>;
    write(data: any): Promise<void>;
    set(name: string, data: any): Promise<void>;
    hasKey(name: string): Promise<boolean>;
    delete(name: string): Promise<void>;
    pathSet(path: string[], name: string, data: any): Promise<void>;
    pathGet(path: string[], name: string): Promise<any>;
    pathDelete(path: string[], name: string): Promise<void>;
    keys(): Promise<string[]>;
    snapshotSelf(): Dict<any>;
    restoreSelf(state: Dict<any>): void;
}
