'use strict';

var FormProvider = require('../components/Form/FormProvider.cjs');
var react = require('react');

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

module.exports = useReactHookForm;
//# sourceMappingURL=useReactHookForm.cjs.map
