'use client'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { Eye, X } from 'lucide-react'; import Image from 'next/image'; import { Button } from './ui/button'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './ui/dialog'; import { KWISATZ_RULES, kwisatzAvailability, type KwisatzBattleContext, type KwisatzDisplayState } from '@/game/kwisatz-display'; export function KwisatzCardFace() { return
Kwisatz Haderach
Original portrait of Kwisatz Haderach, with blue eyes and a green desert mantle

Atreides · Advanced game · +2 strength

A battle companion for a leader or Cheap Hero. The bonus counts if the accompanying leader survives; that leader cannot turn traitor.

Available after seven Atreides battle-force losses. One territory per turn.

; } export function KwisatzPrivateStatus({ state, battle, usedTerritoryName }: { state: KwisatzDisplayState; battle?: KwisatzBattleContext; usedTerritoryName?: string; }) { return

Your private status

{state.losses} of 7 battle losses{state.active ? ' · awakened' : ''}

{kwisatzAvailability(state, battle)}

{state.usedAt &&

Used this turn in {usedTerritoryName ?? state.usedAt}.

}
; } /** State is supplied only from me.kwisatz; reference inspection has no live state. */ export function KwisatzInspector({ state, battle, usedTerritoryName, context = 'reference' }: { state?: KwisatzDisplayState; battle?: KwisatzBattleContext; usedTerritoryName?: string; context?: 'reference' | 'plan'; }) { const label = state ? 'private status' : context === 'plan' ? 'plan component' : 'rules reference'; return } aria-label={`Inspect Kwisatz Haderach · ${label}`}>
{state ? 'Private component inspection' : context === 'plan' ? 'Included in this plan' : 'Rules reference'} }>
{/* oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- Keyboard users need to focus this independently scrolling rules region. */}
Kwisatz Haderach {state ? 'Your battle-loss count and availability are private. Opening this view does not reveal them.' : context === 'plan' ? 'Kwisatz Haderach is included in this plan you are allowed to inspect. No private loss count or current availability is shown.' : 'The Atreides battle companion for the Advanced game. This reference does not show any game’s private loss count or battle plan.'} {state && }
    {KWISATZ_RULES.map(rule =>
  1. {rule}
  2. )}
; } export function KwisatzReferenceCard() { return
; }