import { ForwardRefExoticComponent, RefAttributes } from 'react';

import Menu, { MenuProps } from './Menu';
import MenuItem from './MenuItem';

interface CompoundMenuProps
  extends ForwardRefExoticComponent<
    MenuProps & RefAttributes<HTMLUListElement>
  > {
  Item: typeof MenuItem;
}

const CompoundMenu = Menu as CompoundMenuProps;

CompoundMenu.Item = MenuItem;

export default CompoundMenu;
