import { cx } from 'class-variance-authority';
import type { DropdownMenuItemProps } from '@radix-ui/react-dropdown-menu';

import { DropdownMenu } from '../dropdown-menu';

type ItemProps = DropdownMenuItemProps & {
  onSelect?: (event: React.MouseEvent<HTMLDivElement>) => void;
};

export function Item({ children, className, ...delegated }: ItemProps) {
  return (
    <DropdownMenu.Item {...delegated} className={cx(className, ['c-action-menu-item'])}>
      {children}
    </DropdownMenu.Item>
  );
}
