'use client';
import { useState, type CSSProperties } from 'react';
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
import { Eye, Star, X } from 'lucide-react';
import { FACTIONS, faction, type FactionId } from '@/game/catalog';
import { forceCounterName, forceInventory, type ForcePool, type PublicForcePlayer, type PublicForceWorld } from '@/game/force-inventory';
import { Button } from './ui/button';
import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './ui/dialog';
type CounterKind = 'force' | 'special' | 'advisor';
/** Original diagrammatic counter faces. Text stays crisp at enlarged sizes. */
export function ForceCounterFace({ factionId, kind }: { factionId: FactionId; kind: CounterKind }) {
const house = faction(factionId);
const name = forceCounterName(factionId, kind);
return
{inventory.total} physical force counters across reserves, the Tanks and deployed groups. This is a counter count, not battle strength.
{!inventory.split && ['emperor', 'fremen'].includes(player.faction) &&This table shows a combined force count; starred counters are not listed separately.
}These counters are already included in Reserves above.
{inventory.advisors} deployed counters currently show their advisor face. Advisors are the same physical counters; reserves and the Tanks have no deployed stance.
} {inventory.marker &&{inventory.marker.name}
Counts as one force for board presence until revealed. It is a separate marker, not an extra physical force counter. Its hidden force value is not shown here. Revelation draws from the reserves available then.
Inspecting counters does not move them or commit a Battle Plan. Spice support, temporary powers and leaders may change battle strength without adding counters.
Force counter guideCounter faces are enlarged diagrams. Each is one physical counter; the current rules and powers determine its strength. The gallery shows component types, not a saved table’s quantities.
{selected === 'beneGesserit' &&Fighter and advisor are two faces of the same counter, not two separate forces.
}