import {html} from "lit" import {view} from "@e280/sly" import stylesCss from "./styles.css.js" import themeCss from "../../theme.css.js" import {Id} from "../../../tools/id.js" import {Lobby} from "../../logic/types.js" import {AgentInfo} from "../../../signaller/types.js" export const LobbyView = view(use => ( selfId: string, lobby: Lobby, killProspect?: (id: string) => void, ) => { use.name("lobby") use.styles(themeCss, stylesCss) const clickKick = killProspect ? ((agent: AgentInfo) => ({currentTarget}: PointerEvent) => { if (currentTarget instanceof HTMLElement) currentTarget.blur() killProspect(agent.id) }) : null return html`