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");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
require("./PisellMenu.less");
//#region src/components/pisellMenu/PisellMenu.tsx
const _excluded = [
	"className",
	"style",
	"mode",
	"theme",
	"defaultOpenKeys",
	"defaultSelectedKeys",
	"inlineCollapsed",
	"openKeys",
	"selectedKeys",
	"onOpenChange",
	"onSelect",
	"dataSource",
	"__designMode",
	"children",
	"other"
];
const PisellMenu = (_ref) => {
	let { className, style, mode = "vertical", theme = "light", defaultOpenKeys, defaultSelectedKeys, inlineCollapsed, openKeys, selectedKeys, onOpenChange, onSelect, dataSource, __designMode, children, other } = _ref, restProps = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
	const _dataSource = (0, react.useMemo)(() => {
		if (Array.isArray(dataSource)) return dataSource;
		if (__designMode === "design") return [{
			label: "菜单项1",
			key: "item-1",
			path: "/item-1"
		}, {
			label: "菜单项2",
			key: "item-2",
			path: "/item-2"
		}];
		return [];
	}, [dataSource]);
	return /* @__PURE__ */ react.default.createElement(antd.Menu, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
		className: `pisell-menu ${className || ""}`,
		style,
		items: _dataSource,
		mode,
		theme,
		defaultOpenKeys,
		defaultSelectedKeys,
		inlineCollapsed,
		openKeys,
		selectedKeys,
		onOpenChange,
		onSelect
	}, restProps), other), children);
};
PisellMenu.Item = antd.Menu.Item;
PisellMenu.SubMenu = antd.Menu.SubMenu;
PisellMenu.ItemGroup = antd.Menu.ItemGroup;
//#endregion
exports.default = PisellMenu;
