import React from 'react'; import { Card } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Download, FileText, RefreshCcw } from 'lucide-react'; import type { Purchase } from '@/types'; interface PurchasesViewItemProps { purchase: Purchase; isDownloadOpen: boolean; onToggleDownload: () => void; onDownloadFormat: (format: string) => void; onLicense: () => void; onRefund: () => void; } const DOWNLOAD_FORMATS = ['WAV (24-bit)', 'MP3 (320kbps)', 'Stems (ZIP)']; export function PurchasesViewItem({ purchase, isDownloadOpen, onToggleDownload, onDownloadFormat, onLicense, onRefund, }: PurchasesViewItemProps) { const product = purchase.product as { title: string; coverUrl?: string; type?: string }; return (

{product.title}

{product.type ?? 'pack'} Order #{purchase.orderId} {purchase.date} ${purchase.price}
{isDownloadOpen && (
{DOWNLOAD_FORMATS.map((fmt) => ( ))}
)}
); }