import { PlayIcon } from "lucide-react"; import MotionPhotoPreview from "@/components/MotionPhotoPreview"; import { Badge } from "@/components/ui/badge"; import type { AttachmentLibraryMediaItem, AttachmentLibraryMonthGroup } from "@/hooks/useAttachmentLibrary"; import { useTranslate } from "@/utils/i18n"; import { AttachmentMetadataLine, AttachmentOpenButton } from "./AttachmentLibraryPrimitives"; interface AttachmentMediaGridProps { groups: AttachmentLibraryMonthGroup[]; onPreview: (itemId: string) => void; } const AttachmentMediaCard = ({ item, onPreview }: { item: AttachmentLibraryMediaItem; onPreview: () => void }) => { const t = useTranslate(); return (
{item.filename}
{item.kind === "motion" && ( {t("attachment-library.labels.live")} )}
); }; const AttachmentMediaGrid = ({ groups, onPreview }: AttachmentMediaGridProps) => { return (
{groups.map((group) => (
{group.label}
{group.items.map((item) => ( onPreview(item.previewItem.id)} /> ))}
))}
); }; export default AttachmentMediaGrid;