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

type HandlerType = Handler<{ paymentDetailsState: "waiting" | "active" | "complete" }>;

export const SetPaymentDetailsState: HandlerType = props => {
    props.dispatch({
        type: "Pages/OnePageCheckout/SetPaymentDetailsState",
        paymentDetailsState: props.parameter.paymentDetailsState,
    });
};
export const chain = [SetPaymentDetailsState];

const setPaymentDetailsState = createHandlerChainRunner(chain, "SetPaymentDetailsState");
export default setPaymentDetailsState;
