'use client'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { Eye, Shield, Sparkles, Swords, UserRound, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import { cardPresentation, type VisibleCard } from '@/game/card-presentation'; /** Always pass a card from the requesting player's authorized view, never a deck. */ type CardProps = { card: VisibleCard }; export function CardRules({ card }: CardProps) { return (
{cardPresentation(card).guidance}
); } const faceColors = { weapon: 'from-[#512f28] via-[#302622] to-[#171b17]', defense: 'from-[#284544] via-[#243330] to-[#171b17]', leader: 'from-[#4b3c23] via-[#353123] to-[#171b17]', utility: 'from-[#38344b] via-[#2d2c34] to-[#171b17]', }; const roleIcons = { weapon: Swords, defense: Shield, leader: UserRound, utility: Sparkles, }; /** Read-only inspection. It cannot play a card, read game state, or reveal another card. */ export function CardInspector({ card }: CardProps) { const presentation = cardPresentation(card); const Icon = roleIcons[presentation.role]; return ( ); }