import { FormNextContext } from '../components/FormNext/FormNextProvider.js';
import { useContext } from 'react';

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

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