import { useTranslation } from 'react-i18next' import type { SpiritEntity } from '../lib/types' export type EntityCardProps = { entity: SpiritEntity | null isNew: boolean /** Whether the collapsible dossier body is expanded. */ open: boolean /** Toggle the collapsed/expanded state (ignored while there's no entity). */ onToggleOpen: () => void } /** * Occult dossier of the currently-summoned spirit, wax-seal vibe. * Styling (`.spirit-dossier` / `.dossier-*` / `.rarity-badge` / …) lives in * SeancePage.css alongside the rest of the side column. */ export function EntityCard({ entity, isNew, open, onToggleOpen }: EntityCardProps) { const { t } = useTranslation() if (!entity) { return (

{t('seance.entity.none')}

{t('seance.entity.noneHint')}

) } return (
{open && (

{entity.name}

{entity.epithet}

{t(`seance.entity.rarity.${entity.rarity}`)} {isNew ? ( {t('seance.entity.isNew')} ) : ( {t('seance.entity.known', { count: entity.contact_count })} )}

{t('seance.entity.persona')}

{entity.persona}

{t('seance.entity.voice')}

id
{entity.voice.voice_id}
pitch
{entity.voice.pitch.toFixed(2)}
rate
{entity.voice.rate.toFixed(2)}
noise
{entity.voice.noise.toFixed(2)}
echo
{entity.voice.echo.toFixed(2)}
{entity.quotes.length > 0 && (

{t('seance.entity.quotes')}

    {entity.quotes.slice(0, 4).map((q, i) => (
  • “{q}”
  • ))}
)}
)}
) }