import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["useLoadFormData"];
import { forwardRef } from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
export default function withLoadFormData(Form) {
  return /*#__PURE__*/forwardRef(function WithLoadFormData(_ref, ref) {
    var _useLoadFormData;

    var useLoadFormData = _ref.useLoadFormData,
        otherProps = _objectWithoutProperties(_ref, _excluded);

    return /*#__PURE__*/_jsx(Form, _objectSpread(_objectSpread({
      ref: ref
    }, otherProps), {}, {
      formData: (_useLoadFormData = useLoadFormData === null || useLoadFormData === void 0 ? void 0 : useLoadFormData(otherProps)) !== null && _useLoadFormData !== void 0 ? _useLoadFormData : otherProps.formData
    }));
  });
}
//# sourceMappingURL=withLoadFormData.js.map