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

type HandlerType = Handler<{ listOwner?: string; modalIsOpen: boolean }>;

export const DispatchCompleteSetIsOpen: HandlerType = props => {
    props.dispatch({
        type: "Components/ShareListDetailModal/CompleteSetIsOpen",
        isOpen: props.parameter.modalIsOpen,
        listOwner: props.parameter.listOwner,
    });
};

export const chain = [DispatchCompleteSetIsOpen];

const setShareListDetailModalIsOpen = createHandlerChainRunner(chain, "SetShareListDetailModalIsOpen");
export default setShareListDetailModalIsOpen;
