"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Menu = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const Menu_1 = __importDefault(require("@mui/material/Menu"));
const BottomDrawer_1 = require("../BottomDrawer");
const MenuList_1 = require("../MenuList");
const useViewportType_1 = require("../useViewportType");
const Menu = ({ children, onClose, open, title, MenuListProps, ...restProps }) => {
    const { isMobile } = (0, useViewportType_1.useViewportType)();
    if (isMobile) {
        return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: title, onClose: onClose, open: open, id: MenuListProps?.id, children: (0, jsx_runtime_1.jsx)(MenuList_1.MenuList, { children: children }) }));
    }
    return ((0, jsx_runtime_1.jsx)(Menu_1.default, { open: open, onClose: onClose, MenuListProps: MenuListProps, ...restProps, children: children }));
};
exports.Menu = Menu;
