import { DropdownMenu as DropdownMenuComponent } from "./DropdownMenu";
import { Item } from "./Item";

import type {
  DropdownMenuElementType,
  DropdownMenuProps,
  DropdownMenuRef,
} from "./DropdownMenu";
import type {
  ItemProps as DropdownMenuItemProps,
  ItemRef as DropdownMenuItemRef,
  ItemElementType as DropdownMenuItemElementType,
} from "./Item";

export interface DropdownMenuCompound extends React.FC<DropdownMenuProps> {
  Item: React.FC<DropdownMenuItemProps>;
}

const DropdownMenu: DropdownMenuCompound = Object.assign(
  DropdownMenuComponent,
  {
    Item,
  },
);

export type {
  DropdownMenuElementType,
  DropdownMenuProps,
  DropdownMenuRef,
  DropdownMenuItemProps,
  DropdownMenuItemRef,
  DropdownMenuItemElementType,
};

DropdownMenu.displayName = "DropdownMenu";
export { DropdownMenu };
