import { DIFFICULTIES, type Difficulty } from '../dinners/api.ts' import { Photo } from '../ui/Photo.tsx' import type { SideQuest } from './api.ts' import styles from './DiscoverPage.module.css' // DECK_DEPTH is the depths the deck shows, top card first. export const DECK_DEPTH = [0, 1, 2] as const const DIFFICULTY_LABEL: Record = { easy: 'Easy', medium: 'Medium', hard: 'Hard' } export type DeckCardProps = { quest: SideQuest // 0 is the top card; 1 and 2 stack behind it. depth: number } // DeckCard is one Side quest in the deck. Only the top card is read out and // reachable; the cards behind it are the stack's edge, kept rendered so they // can be promoted. Its "Try it!" and "Pass" stamps stay hidden until a // decision shows them, and its shade until Pass folds it (see motion.ts). export function DeckCard({ quest, depth }: DeckCardProps) { const top = depth === 0 const titleId = `side-quest-${quest.id}` return (

{quest.name}

{quest.difficulty !== null && }

Why this? {quest.reason}

) } function DifficultyDots({ difficulty }: { difficulty: Difficulty }) { const level = DIFFICULTIES.indexOf(difficulty) + 1 return (

) }