import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box } from '../box';
import { useStyleConfig, vui } from '../core';
import List from '../list';
import { PopoverContent } from '../popover';
import { cs } from '../utils';
import { useMenuContext } from './context';
/** Displays a list of menu items in a popover content element. */
export const MenuList = vui((props, ref) => {
    const { className, contentProps, contentRef, maxH, slotTop, slotBottom, ...rest } = props;
    const styles = useStyleConfig('Menu', useMenuContext());
    return (_jsx(PopoverContent, { borderRadius: 0, ref: contentRef, ...contentProps, children: _jsxs(Box, { flexDirection: "column", children: [slotTop, _jsx(List, { className: cs('vui-menuList', className), isInteractive: true, py: 1, ref: ref, w: "100%", ...styles.list, ...rest, maxH: maxH }), slotBottom] }) }));
});
MenuList.Divider = List.Divider;
MenuList.Heading = List.Heading;
MenuList.Icon = List.Icon;
MenuList.Item = List.Item;
MenuList.Text = List.Text;
MenuList.displayName = 'MenuList';
export default MenuList;
//# sourceMappingURL=menuList.js.map