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

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

export const DispatchSetIsOpen: HandlerType = ({ dispatch, parameter: { isOpen } }) => {
    dispatch({
        type: "Components/StorePickupOverlay/SetStorePickupOverlayIsOpen",
        isOpen,
    });
};

export const chain = [DispatchSetIsOpen];

const setStorePickupOverlayIsOpen = createHandlerChainRunner(chain, "SetStorePickupOverlayIsOpen");
export default setStorePickupOverlayIsOpen;
