import React from 'react'; import { Dialog, DialogContent, DialogTitle, } from './dialog'; import { Button } from './button'; import { Eye, Download, } from 'lucide-react'; import { WIDE_DIALOG_CLASS } from '../../lib/dialogStyles'; interface DocumentPreviewModalProps { isOpen: boolean; onClose: () => void; document: { fileName: string; filePath: string; documentType?: string; createdAt?: string; mimeType?: string; } | null; } export const DocumentPreviewModal: React.FC = ({ isOpen, onClose, document }) => { const baseUrl = 'http://localhost:5000'; const fileUrl = document ? `${baseUrl}${document.filePath.startsWith('/') ? '' : '/'}${document.filePath}` : ''; return ( {document ? ( <>
{document.fileName}

{document.documentType}

{document.fileName?.toLowerCase().endsWith('.pdf') ? (