import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useContext } from "react";
var FormContext = /* @__PURE__ */createContext(null),
  useFormContext = function () {
    var context = useContext(FormContext);
    if (!context) throw new Error("useFormContext must be used within a FormProvider");
    return context;
  };
function FormProvider(param) {
  var {
    children,
    formMethods,
    submitHandler = function () {},
    submitting = !1,
    disabled
  } = param;
  return /* @__PURE__ */_jsx(FormContext.Provider, {
    value: {
      ...formMethods,
      submitHandler,
      submitting,
      disabled
    },
    children
  });
}
export { FormProvider, useFormContext };
//# sourceMappingURL=context.native.js.map
