import FormSettingContext from "./FormSettingContext.js";
import React from "react";
//#region src/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.tsx
/**
* @title: 表单设置Provider
* @description: 提供表单设置信息
*/
const FormSettingProvider = (props) => {
	const { children, renderMode, groupInfoPosition, currentValue, size, onDataSourceFinish, formatSubmitValues, formatInitialValues, customSubmit, beforeSubmit, scene, sceneRequestId } = props;
	const value = React.useMemo(() => {
		return {
			renderMode,
			groupInfoPosition,
			currentValue,
			size,
			onDataSourceFinish,
			formatSubmitValues,
			formatInitialValues,
			customSubmit,
			beforeSubmit,
			scene,
			sceneRequestId
		};
	}, [
		renderMode,
		groupInfoPosition,
		currentValue,
		size,
		beforeSubmit,
		scene,
		sceneRequestId
	]);
	return /* @__PURE__ */ React.createElement(FormSettingContext.Provider, { value }, children);
};
//#endregion
export { FormSettingProvider as default };
