{#snippet commentEntry(comment: Comment | CommentReply, threadId: string, showReplyButton: boolean)} {#if editingId === comment.id}
saveEdit(comment.id)} />
{:else}
{comment.authorName} {timeAgo(comment.createdAt)} {#if wasEdited(comment)} {m.comment_edited_label()} {timeAgo(comment.updatedAt)} {/if}

{@html renderBody(comment.content, comment.mentionDTOs ?? [])}

{#if canModify(comment)}
{/if}
{#if showReplyButton && canComment}
{/if} {/if} {/snippet}
{#each comments as thread, ti (thread.id)}
0 ? 'border-t border-line pt-4' : ''}>
{@render commentEntry(thread, thread.id, thread.replies.length === 0)}
{#each thread.replies as reply, ri (reply.id)}
{@render commentEntry(reply, thread.id, ri === thread.replies.length - 1)}
{/each} {#if replyingTo === thread.id}
postReply(thread.id)} />
{/if}
{/each} {#if canComment && showCompose}
0 ? 'border-t border-line pt-4' : ''}>
{/if}