import { DocumentTextIcon, XMarkIcon } from '@heroicons/react/24/outline'; import { MessageExtra } from '../utils/types'; import { useState } from 'react'; import { classNames } from '../utils/misc'; export default function ChatInputExtraContextItem({ items, removeItem, clickToShow, }: { items?: MessageExtra[]; removeItem?: (index: number) => void; clickToShow?: boolean; }) { const [show, setShow] = useState(-1); const showingItem = show >= 0 ? items?.[show] : undefined; if (!items) return null; return (