import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import Form from "../../form/index.js";
import DataSourceProvider from "../provider/dataSource/DataSourceProvider.js";
import BaseForm from "./BaseForm.js";
import React, { forwardRef } from "react";
import "./index.less";
//#region src/components/dataSourceComponents/dataSourceForm/index.tsx
/**
* @title: 数据源表单组件
* @description: 基于数据源动态生成表单，支持编辑、查看、禁用三种模式
*/
const DataSourceForm = forwardRef((props, ref) => {
	const { dataSource, currentValue, __designMode, extraParams } = props;
	return /* @__PURE__ */ React.createElement(DataSourceProvider, {
		dataSource,
		currentValue,
		__designMode,
		extraParams
	}, /* @__PURE__ */ React.createElement(BaseForm, _objectSpread2(_objectSpread2({}, props), {}, { ref })));
});
DataSourceForm.List = Form.List;
//#endregion
export { DataSourceForm as default };
