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 React, { useMemo } from "react";
import { Menu } from "antd";
import "./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 = _objectWithoutProperties(_ref, _excluded);
	const _dataSource = 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.createElement(Menu, _objectSpread2(_objectSpread2({
		className: `pisell-menu ${className || ""}`,
		style,
		items: _dataSource,
		mode,
		theme,
		defaultOpenKeys,
		defaultSelectedKeys,
		inlineCollapsed,
		openKeys,
		selectedKeys,
		onOpenChange,
		onSelect
	}, restProps), other), children);
};
PisellMenu.Item = Menu.Item;
PisellMenu.SubMenu = Menu.SubMenu;
PisellMenu.ItemGroup = Menu.ItemGroup;
//#endregion
export { PisellMenu as default };
