import { _converse } from '@converse/headless/core'; import { html } from "lit-html"; import { renderAvatar } from './directives/avatar.js'; import { until } from 'lit-html/directives/until.js'; export default (o) => { const tpl_standalone_btns = (o) => o.standalone_btns.reverse().map(b => until(b, '')); const avatar = html`${renderAvatar(o.avatar_data)}`; return html`
${ (!_converse.api.settings.get("singleton")) ? html`
` : '' } ${ (o.type !== _converse.HEADLINES_TYPE) ? html`${ avatar }` : '' }
${ (o.type !== _converse.HEADLINES_TYPE) ? html`${ o.display_name }` : o.display_name }
${ o.dropdown_btns.length ? html`` : '' } ${ o.standalone_btns.length ? tpl_standalone_btns(o) : '' }
${ o.status ? html`

${ o.status }

` : '' } `; }