import { jsx as _jsx } from "react/jsx-runtime";
import MuiMenuItem from '@mui/material/MenuItem';
import { forwardRefWithGeneric } from '../forwardRefWithGeneric';
import { Tooltip } from '../Tooltip';
import { classNames } from '../utils/classNames';
import { menuItemClassnames } from './constants';
const InnerMenuItem = (props, ref) => {
    const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, className, ...rest } = props;
    return (_jsx("li", { children: _jsx(Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: _jsx(MuiMenuItem, { className: classNames(menuItemClassnames.root, className), ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
};
export const MenuItem = forwardRefWithGeneric(InnerMenuItem);
