import { FormContext } from '../components/Form/FormProvider.js';
import { useContext } from 'react';

const useReactHookForm = () => {
  const formNextContext = useContext(FormContext);
  if (!formNextContext) {
    throw new Error(
      "Please wrap the parent component with FormProvider for useReactHookForm to work"
    );
  }
  return formNextContext;
};

export { useReactHookForm as default };
//# sourceMappingURL=useReactHookForm.js.map
