import { ApiHandler, createHandlerChainRunnerOptionalParameter } from "@insite/client-framework/HandlerCreator";
import { GetVmiBinCountApiParameter } from "@insite/client-framework/Services/VmiBinsService";

type HandlerType = ApiHandler<GetVmiBinCountApiParameter>;

export const UpdateVmiLocation: HandlerType = props => {
    props.dispatch({
        type: "Pages/VmiDashboard/UpdateVmiLocation",
        result: props.parameter.vmiLocationId,
    });
};

export const chain = [UpdateVmiLocation];

const updateVmiLocation = createHandlerChainRunnerOptionalParameter(chain, {}, "UpdateVmiLocation");
export default updateVmiLocation;
