// SPDX-FileCopyrightText: 2024 John Livingston
//
// SPDX-License-Identifier: AGPL-3.0-only
import { html } from 'lit'
import { api } from '@converse/headless'
import { getAuthorStyle } from '../../../../src/utils/color.js'
import { __ } from 'i18n'
export function tplMucNoteOccupant (el, occupant, note) {
const authorStyle = getAuthorStyle(occupant)
const jid = occupant.get('jid')
const occupantId = occupant.get('occupant_id')
return html`
{
api.modal.show('converse-muc-occupant-modal', { model: occupant }, ev)
}}>
${occupant.getDisplayName()}
${
el.full_display
? html`
${
// user changed nick: display the original nick
note && note.get('about_nick') && note.get('about_nick') !== occupant.get('nick')
// eslint-disable-next-line no-undef
? html`- ${note.get('about_nick')}
`
: ''
}
${jid ? html`- ${jid}
` : ''}
${occupantId ? html`- ${occupantId}
` : ''}
`
: ''
}
`
}