'use client'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { Eye, Wind, X } from 'lucide-react'; import { Button } from './ui/button'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './ui/dialog'; import { STORM_CARD_DISTANCES, isStormCardDistance, stormCardDistance, type StormCardDistance } from '@/game/storm-cards'; const sectors = (distance: number) => `${distance} ${distance === 1 ? 'sector' : 'sectors'}`; const contexts = { forecast: { label: 'Private forecast', description: 'This is your private forecast for the next turn. Inspecting it does not reveal it to other players.', }, reveal: { label: 'Public reveal', description: 'This card was revealed during a Storm phase. It records that revealed face, not the next private forecast.', }, reference: { label: 'Rules reference', description: 'This is one of the six possible Storm Card faces. The reference does not show which card a game has drawn.', }, } as const; function StormCardFace({ distance }: { distance: StormCardDistance }) { return
{distance === 1 ? 'Sector' : 'Sectors'} counterclockwise
; } /** Accept one already-authorized face, never a game, deck or forecast authority. */ export function StormCardInspector({ distance, context = 'reference' }: { distance: unknown; context?: keyof typeof contexts; }) { if (!isStormCardDistance(distance)) return null; const guide = contexts[context]; return } aria-label={`Inspect Storm Card: ${sectors(distance)} · ${guide.label}`}>
{guide.label} }>
Storm Card — {sectors(distance)} {guide.description}

The first Advanced storm uses the Battle Wheels. Every later new Advanced Storm opening reveals a Storm Card for its counterclockwise distance, even without Fremen. The card returns to the deck before the next draw. Only native Fremen has the private forecast advantage.

This face shows the card’s value. Weather Control and other effects can change the actual movement; the table’s storm result records that movement.

; } export function StormCardLogInspector({ component }: { component: unknown }) { const distance = stormCardDistance(component); return distance === null ? null : ; } export function StormCardGallery() { return
{STORM_CARD_DISTANCES.map(distance =>

Storm Card {distance}

)}
; }