/* eslint-disable @next/next/no-img-element -- External card image URLs; next/image migration is out of scope. */ import { formatProcessedDestination } from '../../lib/collection-vocabulary.js'; const CONDITION_OPTIONS = ['NM', 'LP', 'MP', 'HP', 'DMG']; export default function ReviewCardItem({ card, collections, decks, onIncrement, onDecrement, onUpdateMetadata, onRemove, onUndo, isAdding = false, sessionDestination, }) { const destinationLabel = card.processedAction ? formatProcessedDestination(card.processedAction) : sessionDestination?.label ?? 'My Collection'; return (
{/* Thumbnail */}
{card.image_url ? ( {card.name} ) : (
)}
{/* Card info + controls */}
{card.processed ? ( ) : (

{[card.set, card.cardNumber].filter(Boolean).join(' · ')}

{/* Remove button (unprocessed only) */} {!card.processed && ( )}
{card.processed ? (
Added to {destinationLabel} {onUndo && ( )}
) : ( <> {/* Metadata summary line */}

{card.condition || 'NM'} · {card.isFoil ? 'Foil' : 'Not Foil'} · Qty: {card.quantity || 1}

{/* Inline edit controls */}
{/* Condition */} {/* Foil toggle */} {/* Quantity ± */}
{card.quantity || 1}
{/* Destination override */} {(collections.length > 0 || decks.length > 0) && (
)} )}
); }