// 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 tplMucMamSearchOccupant (el, occupant, message) {
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()}
${
// user changed nick: display the original nick
message && message.nick !== undefined && message.nick !== occupant.get('nick')
// eslint-disable-next-line no-undef
? html`- ${message.nick}
`
: ''
}
${jid ? html`- ${jid}
` : ''}
${occupantId ? html`- ${occupantId}
` : ''}
`
}