import { jsx as _jsx } from "react/jsx-runtime";
import MuiMenu from '@mui/material/Menu';
import { BottomDrawer } from '../BottomDrawer';
import { MenuList } from '../MenuList';
import { useViewportType } from '../useViewportType';
export const Menu = ({ children, onClose, open, title, MenuListProps, ...restProps }) => {
    const { isMobile } = useViewportType();
    if (isMobile) {
        return (_jsx(BottomDrawer, { title: title, onClose: onClose, open: open, id: MenuListProps?.id, children: _jsx(MenuList, { children: children }) }));
    }
    return (_jsx(MuiMenu, { open: open, onClose: onClose, MenuListProps: MenuListProps, ...restProps, children: children }));
};
