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

type HandlerType = Handler<{ paymetricIFrameIsSet: boolean }>;

export const DispatchPaymetricIFrameIsSet: HandlerType = props => {
    props.dispatch({
        type: "Pages/CheckoutReviewAndSubmit/PaymetricIFrameIsSet",
        paymetricIFrameIsSet: props.parameter.paymetricIFrameIsSet,
    });
};

export const chain = [DispatchPaymetricIFrameIsSet];

const setPaymetricIFrameIsSet = createHandlerChainRunner(chain, "SetPaymetricIFrameIsSet");
export default setPaymetricIFrameIsSet;
