import { filterUndefined } from "../utils/object.js";
import "../utils/index.js";
import Popover from "../popover/popover.js";
import "../popover/index.js";
import { MenuProvider } from "./context.js";
import menuButton_default from "./menuButton.js";
import menuItem_default from "./menuItem.js";
import menuList_default from "./menuList.js";
import { useMemo } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/menu/menu.tsx
/** Wraps Popover component and exposes some props to the children via context. */
function Menu(props) {
	const { closeOnSelect = true, size, variant, ...rest } = props;
	return /* @__PURE__ */ jsx(MenuProvider, {
		value: useMemo(() => filterUndefined({
			closeOnSelect,
			size,
			variant
		}), [
			closeOnSelect,
			size,
			variant
		]),
		children: /* @__PURE__ */ jsx(Popover, { ...rest })
	});
}
Menu.Button = menuButton_default;
Menu.Item = menuItem_default;
Menu.List = menuList_default;
Menu.displayName = "Menu";
var menu_default = Menu;

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