import {
FileAudioIcon,
FileIcon,
FileTextIcon,
FileVideoIcon,
} from 'lucide-react';
import { cn } from '#/lib/utils.js';
function typeIcon(mimeType) {
const kind = String(mimeType || '').split('/')[0];
if (kind === 'video') return ;
if (kind === 'audio') return ;
if (kind === 'text') return ;
return ;
}
/** The image itself when it is one, otherwise an icon chip for its kind. */
export function FilePreview({ blob, blobBase, className }) {
if (blobBase && blob.mimeType?.startsWith('image/')) {
return (
);
}
return (
{typeIcon(blob.mimeType)}
);
}