import { CommentOutlined } from '@ant-design/icons'; import { Button, Popover } from 'antd'; import { useState } from 'react'; import { CommentsList } from './CommentsList'; import { useDocumentComments } from './useDocumentComments'; /** Кнопка с числом комментариев в строке панели документов [39-01]; по клику — список только для чтения. */ export function CommentsPopover({ documentId, fileName, count }: { documentId: string; fileName: string; count: number }) { const [open, setOpen] = useState(false); const { state, load, reset } = useDocumentComments(documentId); const onOpenChange = (next: boolean) => { setOpen(next); if (next) load(); else reset(); }; const content = (