import { tarotCard, type TarotContent, type TarotReading } from "@/lib/tarot"; import { Paragraphs, Rich } from "../Rich"; import { TarotCard } from "./TarotCard"; /** * A written reading: the title and the gist, each card in its position with * its text, how they read together, and the advice. */ export function TarotResult({ cards, question, content, }: { cards: TarotReading["cards"]; question: string | null; content: TarotContent; }) { return (
A jóslásod

{content.title}

{question &&

„{question}”

}

    {cards.map((c, i) => { const card = tarotCard(c.card); if (!card) return null; return (
  1. {i + 1}. {c.position}

    {card.nameHu} {c.reversed && · fordított}

    {c.about &&

    {c.about}

    }
  2. ); })}
{content.synthesis && (

A lapok együtt

)} {content.advice && (

Útravaló

)}
); }