import 'shared/components/dropdown.js'; import 'shared/components/rich-text.js'; import { __ } from 'i18n'; import { _converse, api } from "@converse/headless/core"; import { html } from "lit"; import { until } from 'lit/directives/until.js'; const tpl_standalone_btns = (o) => o.standalone_btns.reverse().map(b => until(b, '')); export default (o) => { const i18n_hide_topic = __('Hide the groupchat topic'); const i18n_bookmarked = __('This groupchat is bookmarked'); const subject = o.subject ? o.subject.text : ''; const show_subject = (subject && !o.subject_hidden); return html`
${ (!_converse.api.settings.get("singleton")) ? html`` : '' }
${ o.title } ${ (o.bookmarked) ? html`` : '' }
${ o.standalone_btns.length ? tpl_standalone_btns(o) : '' } ${ o.dropdown_btns.length ? html`` : '' }
${ show_subject ? html`

` : '' } `; }