'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
