import { type Card, type Catalog, image, type Print, words } from "./catalog"; import { Add } from "./collection/Add"; import { Mana } from "./Mana"; import { describe, hasArt, Language, titled } from "./Printing"; import { type Along, Printings } from "./Printings"; // One card and the printing on show for it. The printing is given rather than // chosen here, because a search picks it by language and a set is the printing. export function CardRow({ card, print, catalog, along, at, }: { card: Card; print: Print | undefined; catalog: Catalog; // What the list shows, so the panel walks that rather than this card. along?: Along[]; at?: number; }) { const tags = card.kind === "card" ? card.flags : [card.kind, ...card.flags]; const name = titled(card, print); return (
  • {print && hasArt(print) && ( } /> )}

    {name.text} {/* Only when the printing isn't in the language it is read in, so an English name over an English printing says nothing. */} {print && print.lang !== name.lang && ( )} {tags.map((tag) => ( {words(tag)} ))}

    {card.typeLine} {card.stats && {card.stats}} {card.manaCost && }

    {print &&

    {describe(print)}

    }
    {print && } {card.edhrecRank && ( EDHREC #{card.edhrecRank.toLocaleString()} )}
  • ); }