import { html, Component } from "/lib/index.js"; import { SERVER_BUFFER, Unread } from "/state.js"; function BufferItem(props) { function handleClick(event) { event.preventDefault(); props.onClick(); } var name = props.buffer.name; if (name == SERVER_BUFFER) { name = "server"; } var activeClass = props.active ? "active" : ""; var unreadClass = ""; if (props.buffer.unread != Unread.NONE) { unreadClass = "unread-" + props.buffer.unread; } return html`