import React from 'react'; import type { useI18n } from '../../application/i18n/I18nProvider'; import { ContextMenuContent, ContextMenuItem } from '../ui/context-menu'; type TranslateFn = ReturnType['t']; interface SessionTabContextMenuContentProps { sessionId: string; onCloseSession: (sessionId: string) => void; onCopySession?: (sessionId: string) => void; onCopySessionToNewWindow?: (sessionId: string) => void; onDetachSession?: (sessionId: string) => void; onRenameSession: (sessionId: string) => void; renderBulkCloseItems?: (anchorId: string) => React.ReactNode; t: TranslateFn; } export function SessionTabContextMenuContent({ sessionId, onCloseSession, onCopySession, onCopySessionToNewWindow, onDetachSession, onRenameSession, renderBulkCloseItems, t, }: SessionTabContextMenuContentProps) { return ( onRenameSession(sessionId)}> {t('common.rename')} {onCopySession && ( onCopySession(sessionId)}> {t('tabs.copyTab')} )} {onCopySessionToNewWindow && ( onCopySessionToNewWindow(sessionId)}> {t('tabs.copyTabToNewWindow')} )} {onDetachSession && ( onDetachSession(sessionId)}> {t('terminal.menu.detach')} )} onCloseSession(sessionId)}> {t('common.close')} {renderBulkCloseItems?.(sessionId)} ); }