/** * @file Accueil de l'Équipe du jour quand le joueur n'a pas d'équipe (ou qu'elle s'est reposée) : un appel à * recruter, cinq places à pourvoir, puis les trois étapes (recruter, améliorer, partir en quête), * chacune avec un visuel. L'équipe n'est liée à aucun jeu. */ import { CurrencyIcon } from "./Currency.jsx"; import { fillTemplate } from "./dailyShare.js"; const TABLE_ART = "/static/img/cards/guild/tavern.webp"; // Trois personnages du catalogue, pris loin les uns des autres, pour montrer une proposition de recrutement. function sampleCards(catalog) { const cards = catalog.cards.filter((card) => card.image && card.expedition?.profile); const pool = cards.length >= 3 ? cards : catalog.cards.filter((card) => card.image); return pool.length ? [0, Math.floor(pool.length / 2), pool.length - 1].map((index) => pool[index]) : []; } const STEP_VISUALS = { recruit: ({ catalog }) => {sampleCards(catalog).map((card) => )}, improve: () => ★★?✖ , quest: ({ maxDays }) => {Array.from({ length: maxDays }, (_, index) => {index + 1})} }; export function TeamWelcome({ catalog, team, content, action }) { const expired = team.status === "expired"; return <>

{expired ? content.expiredTitle : content.noneTitle}

{fillTemplate(expired ? content.expiredText : content.noneText, { max: team.maxDays })}

{action}
    {content.welcomeSteps.map((step, index) => { const Visual = STEP_VISUALS[step.id]; return
  1. {step.title}

    {fillTemplate(step.text, { max: team.maxDays })}

    {step.tip &&

    {step.tip}

    }
  2. ; })}
; }