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

interface Parameter {
    modalIsOpen: boolean;
}

type HandlerType = Handler<Parameter>;

export const DispatchSetModalIsOpen: HandlerType = props => {
    props.dispatch({
        type: "Components/VmiUsersImportModal/SetModalIsOpen",
        isOpen: props.parameter.modalIsOpen,
    });
};

export const chain = [DispatchSetModalIsOpen];

const setVmiUsersImportModalIsOpen = createHandlerChainRunner(chain, "SetVmiUsersImportModalIsOpen");
export default setVmiUsersImportModalIsOpen;
