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

type HandlerType = Handler<{ orderNumber: string }>;

export const DispatchSetOrderNumber: HandlerType = props => {
    props.dispatch({
        type: "Pages/OrderDetails/SetOrderNumber",
        orderNumber: props.parameter.orderNumber,
    });
};

export const chain = [DispatchSetOrderNumber];

const setOrderNumber = createHandlerChainRunner(chain, "SetOrderNumber");
export default setOrderNumber;
