import Image from 'next/image'
import Link from 'next/link'
import { sendCardOpeningEvent } from '@/lib/contentEvents'
import { contentPieceTypeLabels } from '@/lib/contentPiece'
import { CONTENT_PIECE_ASPECT_CLASS, type CardCatalogItem } from '@/lib/contentPieceCatalog'
import { cn } from '@/lib/utils'
import {
CONTENT_PIECE_CARD,
CONTENT_PIECE_FOCUS,
CONTENT_PIECE_OUTLINE_BUTTON,
CONTENT_PIECE_TAG,
} from './contentPieceClasses'
/**
* S38 — the art of a model item (artefato: cenas 01–03): the model's real file
* whole in the 3:4 vertical slot (S45 — the art is never cropped), or the
* neutral dashed placeholder of the photo models, whose master is only the
* frame with a transparent photo window. The `NOVO` badge of the newest model
* sits on the art.
*/
const CardItemArt = ({ item }: { item: CardCatalogItem }) => (
{item.art.kind === 'placeholder' ? (
◎
) : (
)}
{item.badge ? (
{item.badge}
) : null}
)
/**
* S38 — one card model as an item of the board (artefato: cenas 01–05). The
* whole item is a single link to the studio with the model chosen — a bigger
* tap target on the phone and no second selection contract. It is NOT a piece:
* no download, no share, no detail page; the item is an invite to `/cards`.
* The click feeds the anonymous opening event of the model (C213/S32
* mechanism), never a piece event.
*/
export const ContentCatalogCardItem = ({ item }: { item: CardCatalogItem }) => (
sendCardOpeningEvent(item.modelId)}
className={cn(
CONTENT_PIECE_CARD,
'grid grid-cols-[112px_minmax(0,1fr)] text-black no-underline sm:block',
item.badge ? 'border-2 border-[#e4102f]' : null,
CONTENT_PIECE_FOCUS,
)}
>
{contentPieceTypeLabels.card}
{/* Artefato (cena 02): no celular o selo vive na tag, não sobre a arte. */}
{item.badge ? · {item.badge} : null}