`
: ``
}
${
hasBody
? html`
${hasText
? 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.post.html)
}
`
: ``}
${hasAnnotations
? html`
{
if (e.detail.action === ActionType.Preview && e.detail.file) {
void this.previewAnnotationsRef.value?.open(e.detail.file.id);
}
}}
>`
: nothing}
${hasPoll
? html`
this.dispatchVote(e.detail.optionId)}
>
`
: nothing}
${hasEmbed ? html`
` : nothing}
${hasFiles
? html`
{
if (e.detail.action === ActionType.Preview && e.detail.file) {
void this.previewAttachmentsRef.value?.open(e.detail.file.id);
}
}}
>`
: nothing}
${hasMeeting ? html`
` : nothing}
${
this.componentFeatures?.allowsFeature(Feature.Comments)
? html` this.handleCommentsClick(e)}
>
${commentCount !== 1 ? msg(str`${commentCount} comments`) : msg("1 comment")}
`
: nothing
}
${
this.componentFeatures?.allowsFeature(Feature.Reactions) && this.app
? html`
`
: nothing
}
${
this.loadComments
? html`
`
: nothing
}