${this.messageId < 0
? html`
`
: hideBlockedContent
? html`
(this.revealBlocked = true)}>${msg("Show message from blocked user.")}
`
: html`
${images && Boolean(images.length)
? html`
{
if (e.detail.action === ActionType.Preview && e.detail.file) {
void this.previewAttachmentsRef.value?.open(e.detail.file.id);
}
}}
>`
: nothing}
${this.html
? html`
{
if (
e.target instanceof HTMLElement &&
e.target.matches('.wy-mention, [part~="wy-mention"]')
) {
const uid =
e.target.dataset.eid?.startsWith("u") && parseInt(e.target.dataset.eid.substring(1));
if (uid) {
this.dispatchAction({
action: ActionType.Preview,
user: { id: uid, name: e.target.innerText },
});
}
}
}}
>${
// eslint-disable-next-line lit-a11y/click-events-have-key-events
unsafeHTML(this.html)
}
`
: nothing}
${this.annotations && Boolean(this.annotations.length)
? html`
{
if (e.detail.action === ActionType.Preview && e.detail.file) {
void this.previewAnnotationsRef.value?.open(e.detail.file.id);
}
}}
>`
: nothing}
${this.pollOptions && Boolean(this.pollOptions.length)
? html`
this.dispatchVote(e.detail.optionId)}
>`
: nothing}
${this.componentFeatures?.allowsFeature(Feature.Embeds) && this.embed
? html`
`
: nothing}
${files && Boolean(files.length)
? html`
{
if (e.detail.action === ActionType.Preview && e.detail.file) {
void this.previewAttachmentsRef.value?.open(e.detail.file.id);
}
}}
>`
: nothing}
${this.meeting ? html`
` : nothing}
${this.componentFeatures?.allowsFeature(Feature.Reactions) && this.conversation
? html`
${keyed(
`reactions-${this.conversation.id}-${this.messageId}`,
html`
`,
)}
`
: nothing}
`}