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

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

export const DispatchSetAddLocationModalIsOpen: HandlerType = props => {
    props.dispatch({
        type: "Pages/VmiLocations/SetAddLocationModalIsOpen",
        addLocationModalIsOpen: props.parameter.addLocationModalIsOpen,
    });
};

export const chain = [DispatchSetAddLocationModalIsOpen];

const setAddLocationModalIsOpen = createHandlerChainRunner(chain, "SetAddLocationModalIsOpen");
export default setAddLocationModalIsOpen;
