import { FC } from 'react';

import { CopyTypePath } from 'src/types/deeplinks';

import CopyUrlMenuItem from 'src/components/deeplinks/CopyUrlMenuItem';
import MoreMenu from 'src/components/deeplinks/MoreMenu';

import { eventsRoutes } from './routes';

export type EventMenuProps = {
  id: number;
};

export const EventMenu: FC<EventMenuProps> = props => {
  const { id } = props;

  const menuOptions = [
    {
      id: 'copy-url',
      enabled: true,
      option: (
        <CopyUrlMenuItem
          type={CopyTypePath.EVENT}
          route={eventsRoutes.event(id)}
        />
      ),
    },
  ];

  return (
    <MoreMenu
      id={`event-${id}`}
      menuOptions={menuOptions}
    />
  );
};

export default EventMenu;
