import { ObjectUpdateType } from '../ObjectUpdateType';
import { Primitive, PrimitiveEvents } from '../Primitive';
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<I extends Dict<any> = any> = {
    set: [keyof I, I[keyof I]];
};
export type StatefulEvents<_EE extends Dict<any[]>> = PrimitiveEvents<_EE & Stateful_EE> & Stateful_EE;
export declare class Stateful<I extends Dict<any> = any, O extends Dict<any> = any, _J extends Dict<any> = {}, _EE extends StatefulEvents<_EE> = StatefulEvents<Stateful_EE>> extends Primitive<I, O, _EE> implements J<I>, V {
    __: string[];
    protected _defaultState: Partial<Record<keyof I, any>>;
    protected _state: Partial<Record<keyof I, 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<K extends keyof I>(name: K, data: any): void;
    onDataInputDrop<K extends keyof I>(name: K): void;
    onRefInputData(name: any, data: any): void;
    onRefInputDrop(name: any): void;
    get<K extends keyof I>(name: K): Promise<any>;
    read(): Promise<any>;
    write(data: any): Promise<void>;
    set<K extends keyof I>(name: K, data: any, auto?: boolean): Promise<void>;
    hasKey<K extends keyof I>(name: K): Promise<boolean>;
    delete<K extends keyof I>(name: K): 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;
}
