import { XCircleIcon } from "lucide-react"; import Image from "next/image"; import DocxIcon from "../ui/icons/docx.svg"; import PdfIcon from "../ui/icons/pdf.svg"; import SheetIcon from "../ui/icons/sheet.svg"; import TxtIcon from "../ui/icons/txt.svg"; import { Button } from "./button"; import { DocumentFile, DocumentFileType } from "./chat"; import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle, DrawerTrigger, } from "./drawer"; import { cn } from "./lib/utils"; export interface DocumentPreviewProps { file: DocumentFile; onRemove?: () => void; } export function DocumentPreview(props: DocumentPreviewProps) { const { filename, filesize, content, filetype } = props.file; if (content.type === "ref") { return (
{content.value as string}
)}