import Image from "next/image" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" import { DocumentIcon } from "@/components/document-icon" function getFileExtension(documentType: string): string | null { switch (documentType) { case "pdf": return ".pdf" default: return null } } export function Title({ title, documentType, url, pluginIconSrc, }: { title: string | null | undefined documentType: string url?: string | null pluginIconSrc?: string }) { const extension = getFileExtension(documentType) return (
{pluginIconSrc ? ( ) : ( )} {extension && (

{extension}

)}
{title || "Untitled Document"}
) }