const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_useEngineContext = require("../../hooks/useEngineContext.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
//#region src/components/pisellLayout/content.tsx
const _excluded = [
	"children",
	"className",
	"height",
	"scroll"
];
const { Content } = antd.Layout;
const PisellContent = (props) => {
	const { children, className, height, scroll } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const lowCodeProps = require_useEngineContext.default();
	/**
	* @title: 内容
	* @description: 该组件的children默认注入页面内容
	* @param {*} useMemo
	* @return {*}
	* @Author: zhiwei.Wang
	*/
	const pageContent = (0, react.useMemo)(() => {
		var _lowCodeProps$engine;
		if (props.__designMode === "design") return "Page content";
		return lowCodeProps === null || lowCodeProps === void 0 || (_lowCodeProps$engine = lowCodeProps.engine) === null || _lowCodeProps$engine === void 0 || (_lowCodeProps$engine = _lowCodeProps$engine.props) === null || _lowCodeProps$engine === void 0 ? void 0 : _lowCodeProps$engine.children;
	}, [props.__designMode]);
	const contentStyle = (0, react.useMemo)(() => {
		return require_objectSpread2._objectSpread2({ height }, rest.style);
	}, [height, rest.style]);
	const contentClassName = (0, classnames.default)("pisell-layout-content", className, { "pisell-layout-content-scroll": scroll });
	return /* @__PURE__ */ react.default.createElement(Content, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, rest), {}, {
		style: contentStyle,
		className: contentClassName
	}), children, pageContent);
};
//#endregion
exports.default = PisellContent;
