import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import useEngineContext from "../../hooks/useEngineContext.js";
import React, { useMemo } from "react";
import { Layout } from "antd";
import classNames from "classnames";
//#region src/components/pisellLayout/content.tsx
const _excluded = [
	"children",
	"className",
	"height",
	"scroll"
];
const { Content } = Layout;
const PisellContent = (props) => {
	const { children, className, height, scroll } = props, rest = _objectWithoutProperties(props, _excluded);
	const lowCodeProps = useEngineContext();
	/**
	* @title: 内容
	* @description: 该组件的children默认注入页面内容
	* @param {*} useMemo
	* @return {*}
	* @Author: zhiwei.Wang
	*/
	const pageContent = 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 = useMemo(() => {
		return _objectSpread2({ height }, rest.style);
	}, [height, rest.style]);
	const contentClassName = classNames("pisell-layout-content", className, { "pisell-layout-content-scroll": scroll });
	return /* @__PURE__ */ React.createElement(Content, _objectSpread2(_objectSpread2({}, rest), {}, {
		style: contentStyle,
		className: contentClassName
	}), children, pageContent);
};
//#endregion
export { PisellContent as default };
