'use client'; import { useState } from 'react'; import Image from 'next/image'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { Eye, X } from 'lucide-react'; import { FACTIONS, faction, type FactionId } from '@/game/catalog'; import { FACTION_RULES } from '@/game/faction-reference'; import { HOMEWORLD_CARDS } from '@/game/homeworld-cards'; import { Button } from './ui/button'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './ui/dialog'; /** Static public reference only: no player, holdings, hidden choices or action callback. */ export function FactionSheet({ factionId, advanced }: { factionId: FactionId; advanced: boolean }) { const house = faction(factionId); const rules = FACTION_RULES[factionId]; const world = HOMEWORLD_CARDS.find(card => card.faction === factionId)!; return

Faction sheet ยท {advanced ? 'Advanced' : 'Basic'}

{house.name}

{house.title}

Basic powers and alliances

    {rules.basic.map(text =>
  1. {text}
  2. )}
{advanced &&

Advanced powers

Use these with the Basic powers above and the Advanced game rules.

    {rules.advanced.map(text =>
  1. {text}
  2. )}
}
; } function FactionSheetReader({ factionId, tableAdvanced }: { factionId: FactionId; tableAdvanced?: boolean }) { const [advanced, setAdvanced] = useState(tableAdvanced ?? false); return
{tableAdvanced !== undefined &&

This table uses {tableAdvanced ? 'Advanced' : 'Basic'} rules.{advanced !== tableAdvanced && ' You are previewing the other rules mode; the table has not changed.'}

}
; } export function FactionInspector({ factionId, advanced }: { factionId: FactionId; advanced: boolean }) { const house = faction(factionId); return } aria-label={`Inspect faction: ${house.name}`}>
Public faction sheet}>
{/* oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- The long faction sheet scrolls independently and needs keyboard access. */}
{house.name} faction sheet Read public faction powers and alliance guidance without changing the game. Faction sheet help
; } export function FactionSheetGallery() { const [selected, setSelected] = useState('atreides'); return
; }