export declare namespace StateMachine {
    interface Transition<Action extends string | number, State extends string | number> {
        title?: string;
        from: State;
        to: State;
        actions: Action[];
    }
    type ActionMap<Action extends string | number, Context> = {
        [k in Action]?: (context: Context) => void;
    };
    type StateTransitionMap<Action extends string | number, State extends string | number> = {
        [k in State]?: {
            on: {
                [p in State]?: {
                    target: State;
                    actions: Action[];
                };
            };
        };
    };
}
export declare class Interpreter<Action extends string | number, State extends string | number, Context> {
    private state;
    private context;
    private actions;
    private states;
    constructor(state: State, context: Context, states: StateMachine.StateTransitionMap<Action, State>, actions: StateMachine.ActionMap<Action, Context>);
    send(state: State): void;
}
export declare class MachineBuilderFactory<Action extends string | number, State extends string | number, Context> {
    private actionMap;
    private transitions;
    private states;
    withActions(actionMap: StateMachine.ActionMap<Action, Context>): MachineBuilderFactory<Action, State, Context>;
    withTransitions(transitions: StateMachine.Transition<Action, State>[]): MachineBuilderFactory<Action, State, Context>;
    build(): MachineBuilder<Action, State, Context>;
    private generateStates;
}
export declare class MachineBuilder<Action extends string | number, State extends string | number, Context> {
    private actionMap;
    private states;
    constructor(actionMap: StateMachine.ActionMap<Action, Context>, states: StateMachine.StateTransitionMap<Action, State>);
    interpret(initialState: State, context: Context): Interpreter<Action, State, Context>;
}
