import { IKosCoreManager } from '../kosCore';

export declare enum KosCoreState {
    CREATING = "creating",
    CREATED = "created",
    INITIALIZING = "initializing",
    INITIALIZED = "initialized",
    LOADING = "loading",
    LOADED = "loaded",
    ONLINE = "online",
    READYING = "readying",
    READY = "ready",
    OFFLINE = "offline",
    UNLOADING = "unloading",
    UNLOADED = "unloaded",
    RELOADING = "reloading"
}
export declare enum KosCoreEvents {
    CREATE = "create",
    INITIALIZE = "init",
    READY = "ready",
    GO_ONLINE = "go_online",
    GO_OFFLINE = "go_offline",
    UNLOAD = "unload",
    RELOAD = "reload"
}
export interface KosOn {
    [k: string]: string;
}
export interface KosInvoke<Context> {
    id: string;
    src: (context: Context) => Promise<any>;
    onDone: {
        target: string;
    };
}
export interface KosLifecycleState {
    on: KosOn;
}
export interface KosLifecycleStateContainer<Context> {
    [k: string]: {
        initial?: string;
        states?: KosLifecycleStateContainer<Context>;
        on?: KosOn;
        invoke?: KosInvoke<Context>;
    };
}
export interface KosLifecycle<Context = any> {
    id: string;
    initial: string;
    states: KosLifecycleStateContainer<Context>;
    context: Context;
}
export declare const coreFsm: (core: IKosCoreManager) => {
    service: import('robot3').Service<import('robot3').Machine<{
        creating: import('robot3').MachineState;
        created: import('robot3').MachineState;
        initializing: import('robot3').MachineState;
        initialized: import('robot3').MachineState;
        loading: import('robot3').MachineState;
        loaded: import('robot3').MachineState;
        readying: import('robot3').MachineState;
        reloading: import('robot3').MachineState;
        ready: import('robot3').MachineState;
        unloaded: import('robot3').MachineState;
    }, {}, import('robot3').AllStateKeys<{
        creating: unknown;
        created: unknown;
        initializing: unknown;
        initialized: unknown;
        loading: unknown;
        loaded: unknown;
        readying: unknown;
        reloading: unknown;
        ready: unknown;
        unloaded: unknown;
    }>>>;
    online: import('robot3').Service<import('robot3').Machine<{
        online: import('robot3').MachineState;
        offline: import('robot3').MachineState;
    }, {}, import('robot3').AllStateKeys<{
        online: unknown;
        offline: unknown;
    }>>>;
};
//# sourceMappingURL=kosCoreLifecycle.d.ts.map