import { createHandlerChainRunner, Handler } from "@insite/client-framework/HandlerCreator";

type HandlerType = Handler<{
    nextAction?: Function;
}>;

export const DispatchSetNextAction: HandlerType = props => {
    props.dispatch({
        type: "Pages/VmiBins/SetNextAction",
        nextAction: props.parameter.nextAction,
    });
};

export const chain = [DispatchSetNextAction];

const setNextAction = createHandlerChainRunner(chain, "SetNextAction");
export default setNextAction;
