import clsx from 'clsx' import { forwardRef } from 'react' import { useTranslation } from 'react-i18next' import { CommandModalContextSectionItem } from '@dao-dao/types/command' import { toAccessibleImageUrl } from '@dao-dao/utils' import { TooltipInfoIcon } from '../tooltip' export interface ItemRowProps { item: CommandModalContextSectionItem selected: boolean onClick: () => void className?: string } export const ItemRow = forwardRef( function ItemRow({ item, selected, onClick, className }, ref) { const { t } = useTranslation() return (
{'imageUrl' in item ? (
) : ( )}

{item.name}

{!!item.tooltip && ( )}
) } )