import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { useStyleConfig } from "../core/theme.js";
import { vui } from "../core/vui.js";
import { Box } from "../box/box.js";
import "../box/index.js";
import "../core/index.js";
import list_default from "../list/list.js";
import "../list/index.js";
import popoverContent_default from "../popover/popoverContent.js";
import "../popover/index.js";
import { useMenuContext } from "./context.js";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/menu/menuList.tsx
/** Displays a list of menu items in a popover content element. */
const MenuList = vui((props, ref) => {
	const { className, contentProps, contentRef, maxH, slotTop, slotBottom, ...rest } = props;
	const styles = useStyleConfig("Menu", useMenuContext());
	return /* @__PURE__ */ jsx(popoverContent_default, {
		borderRadius: 0,
		ref: contentRef,
		...contentProps,
		children: /* @__PURE__ */ jsxs(Box, {
			flexDirection: "column",
			children: [
				slotTop,
				/* @__PURE__ */ jsx(list_default, {
					className: cs("vui-menuList", className),
					isInteractive: true,
					py: 1,
					ref,
					w: "100%",
					...styles.list,
					...rest,
					maxH
				}),
				slotBottom
			]
		})
	});
});
MenuList.Divider = list_default.Divider;
MenuList.Heading = list_default.Heading;
MenuList.Icon = list_default.Icon;
MenuList.Item = list_default.Item;
MenuList.Text = list_default.Text;
MenuList.displayName = "MenuList";
var menuList_default = MenuList;

//#endregion
export { menuList_default as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=menuList.js.map