import { FileAudioIcon, FileIcon, PlayIcon } from "lucide-react"; import AudioAttachmentItem from "@/components/MemoMetadata/Attachment/AudioAttachmentItem"; import VideoPoster from "@/components/VideoPoster"; import type { AttachmentLibraryListItem } from "@/hooks/useAttachmentLibrary"; import { cn } from "@/lib/utils"; import { getAttachmentThumbnailUrl, getAttachmentType, isMotionAttachment } from "@/utils/attachment"; import { AttachmentMetadataLine, AttachmentOpenButton, AttachmentSourceChip } from "./AttachmentLibraryPrimitives"; const AttachmentThumb = ({ item, className }: { item: AttachmentLibraryListItem; className?: string }) => { const type = getAttachmentType(item.attachment); const isMotion = isMotionAttachment(item.attachment); if (type === "image/*" || isMotion) { return (
{item.attachment.filename}
); } if (type === "video/*") { return (
); } return (
{type === "audio/*" ? : }
); }; export const AttachmentDocumentRows = ({ items }: { items: AttachmentLibraryListItem[] }) => { return (
{items.map((item) => (
{item.attachment.filename}
))}
); }; export const AttachmentAudioRows = ({ items }: { items: AttachmentLibraryListItem[] }) => { return (
{items.map((item) => (
))}
); }; export const AttachmentUnusedRows = ({ items }: { items: AttachmentLibraryListItem[] }) => { return (
{items.map((item) => (
{item.attachment.filename}
))}
); };