import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { useFormFields } from "./useFormFields.js";
export const FormContext = React.createContext({});
export const FormProvider = ({ children }) => {
    const formFieldsData = useFormFields();
    return _jsx(FormContext.Provider, { value: formFieldsData, children: children });
};
export const useFormContext = () => {
    const context = React.useContext(FormContext);
    if (!context) {
        throw new Error('useFormContext must be used within a FormProvider');
    }
    return context;
};
//# sourceMappingURL=FormContext.js.map
