import { MessageSquare } from 'lucide-react'; import { useState } from 'react'; import { CommentThread } from '@/components/comments/comment-thread'; import { type CommentsShellProps } from '@/components/comments/shells/types'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog'; import { useTranslation } from '@/hooks/use-translation'; /** * The default theme's comment shell: a plain dialog from the file row, * matching the neutral bordered look the rest of this theme uses. * * A shell owns the chrome and nothing else — see the `types` module for * the contract every shell shares. */ export function CommentsShellDefault({ fileId, fileName, endpoint, count = 0, unread = 0, inline = false, defaultOpen = false }: CommentsShellProps) { const { t } = useTranslation(); const [open, setOpen] = useState(defaultOpen); if (inline) { return (

{t('Comments')}

); } return ( {fileName} {/* Mounted only while open, so opening a row is what loads its thread — a file list must not fire one request per row on render. */} {open && } ); }