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

type HandlerType = Handler<{
    nextPageUrl?: string;
}>;

export const DispatchSetNextPageUrl: HandlerType = props => {
    props.dispatch({
        type: "Pages/VmiBins/SetNextPageUrl",
        nextPageUrl: props.parameter.nextPageUrl,
    });
};

export const chain = [DispatchSetNextPageUrl];

const setNextPageUrl = createHandlerChainRunner(chain, "SetNextPageUrl");
export default setNextPageUrl;
