import React from "react";
import { FormSubmitHookContext } from "@qorebase/app-component";
export const useFormSubmitHook = (listener, dependencies) => {
    const submitHookContext = React.useContext(FormSubmitHookContext);
    React.useEffect(() => {
        submitHookContext.addListener(listener);
        return () => void submitHookContext.removeListener(listener);
    }, [submitHookContext, ...dependencies]);
};
//# sourceMappingURL=useFormSubmitHook.js.map