import * as React from 'react' import type { TalkNPCs, TalkNPC } from '@lastres/talk-npc' import type { StateGame } from '@lastres/components/game' import TalkNPCComponent from '@lastres/components/talk-npc' export interface TalkNPCsComponentProps { talkNPCs: TalkNPCs | null websocket: WebSocket | null setStateGame: (set: StateGame) => void setNPCToSayWord: (set: TalkNPC | null) => void } export default function TalkNPCsComponent (props: TalkNPCsComponentProps): JSX.Element { const npcs = props.talkNPCs if (npcs === null) { return <> } if (Object.keys(npcs).length < 1) { return <>

No hay nadie para hablar ahora.

} return ( <>

Disponible para hablar:

{ Object.keys(npcs).map((identifier) => { const npc = npcs[identifier] return ( ) }) } ) }