'use client'; import Image from 'next/image'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { FACTIONS } from '@/game/catalog'; import { HOMEWORLD_CARDS, type HomeworldCard } from '@/game/homeworld-cards'; import { Button } from './ui/button'; import { Tabs, TabsList, TabsTrigger, TabsContent } from './ui/tabs'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './ui/dialog'; function HomeworldPopulation({ card, side, enlarged, }: { card: HomeworldCard; side: 'high' | 'low'; enlarged: boolean; }) { const face = card[side]; return (

{side === 'high' ? 'High' : 'Low'} population

{face.reserves.min}–{face.reserves.max}{' '} {card.reserveType === 'sardaukar' ? 'Sardaukar' : 'reserves'}
{face.gameplay.map((text) => (

{text}

))}

+{face.battleStrength} battle strength
Added to the native faction’s dial here.

{face.battleStrength} explosion losses
Native forces lost to a Lasgun/Shield explosion here.

); } export function HomeworldFace({ card, enlarged = false, }: { card: HomeworldCard; enlarged?: boolean; }) { const faction = FACTIONS.find((item) => item.id === card.faction)!; return (

{faction.name} · Homeworld

{card.name}

{card.id === 'salusa_secundus' && ( Advanced only )}
High face Low / occupied face

Occupied

{card.occupied.gameplay.map((text) => (

{text}

))}

{card.occupied.spiceIcons} bank spice during Spice Collection

The low-population penalty continues while occupied.

{card.id === 'salusa_secundus' && (

Both printed ranges include 2. The module’s minimum-high rule makes 2 Sardaukar high population.

)} {!enlarged && (
} > Inspect {card.name}
{card.name} } > Close
Both faces of the Homeworld card, including population ranges, native battle values and occupied effects.
)}
); } export function HomeworldCardGallery() { return (

13 worlds · Inspect either face to read its complete gameplay effects. Supported Homeworld selections are available as unfinished previews; some combinations remain unavailable.

{HOMEWORLD_CARDS.map((card) => ( ))}
); }