import React from 'react';
import FormSettingContext from "./FormSettingContext";

/**
 * @title: 表单设置Provider
 * @description: 提供表单设置信息
 */
var FormSettingProvider = function FormSettingProvider(props) {
  var children = props.children,
    renderMode = props.renderMode,
    groupInfoPosition = props.groupInfoPosition,
    currentValue = props.currentValue,
    size = props.size,
    onDataSourceFinish = props.onDataSourceFinish,
    formatSubmitValues = props.formatSubmitValues,
    formatInitialValues = props.formatInitialValues,
    customSubmit = props.customSubmit,
    beforeSubmit = props.beforeSubmit,
    scene = props.scene,
    sceneRequestId = props.sceneRequestId;
  var value = React.useMemo(function () {
    return {
      renderMode: renderMode,
      groupInfoPosition: groupInfoPosition,
      currentValue: currentValue,
      size: size,
      onDataSourceFinish: onDataSourceFinish,
      formatSubmitValues: formatSubmitValues,
      formatInitialValues: formatInitialValues,
      customSubmit: customSubmit,
      beforeSubmit: beforeSubmit,
      scene: scene,
      sceneRequestId: sceneRequestId
    };
  }, [renderMode, groupInfoPosition, currentValue, size, beforeSubmit, scene, sceneRequestId]);
  return /*#__PURE__*/React.createElement(FormSettingContext.Provider, {
    value: value
  }, children);
};
export default FormSettingProvider;