@if (canWrite && newestFirst) { }
@if (threads.failed) { } @else if (!threads.loading && !threads.value.length) {
{{ text.empty | translate }}
} @else {
    @for (thread of threads.value; track thread.entry.comment.id) { @let entry = thread.entry; @let open = openThreadId === entry.comment.id; @let latest = thread.replies[thread.replies.length - 1];
  1. @if (canWrite) {
    }
    @if (open || thread.replies.length) {
    {{ entry.text || ('PROJECT_VIEW.COMMENT_IMAGE' | translate) }}
    @if (!open) {
    @if (latest) { {{ latest.author?.name || ('GOALS_PAGE.COMMENT_THREAD.UNKNOWN_AUTHOR' | translate) }} {{ latest.text || ('PROJECT_VIEW.COMMENT_IMAGE' | translate) }} {{ latest.ago }} } @else { {{ 'GOALS_PAGE.COMMENT_THREAD.NO_MESSAGES' | translate }} }
    } @else { @if (thread.replies.length) {
      @for (reply of thread.replies; track reply.comment.id) {
    1. @if (reply.canDelete) {
      }
    2. }
    } @else {
    {{ 'GOALS_PAGE.COMMENT_THREAD.NO_MESSAGES' | translate }}
    } @if (canWrite) {
    } }
    }
  2. }
}
@if (canWrite && !newestFirst) { }
@if (entry.author && entry.authorLink) { {{ entry.author.name }} } @else if (entry.author) { {{ entry.author.name }} } @else { {{ 'GOALS_PAGE.COMMENT_THREAD.UNKNOWN_AUTHOR' | translate }} }
@if (entry.text) {

{{ entry.text }}

} @if (entry.images.length) {
@for (image of entry.images; track $index) { @let urls = imageUrls.get(image.assetId); }
}
@if (reactionsShown) { @let chips = reactionChips.get(entry.comment.id) ?? []; @if (chips.length || canReact) {
@for (chip of chips; track chip.emoji) { } @if (canReact) { @if (pickerFor === entry.comment.id) { @for (emoji of quickReactions; track emoji) { } } }
} }
@if (canAttach) { } @if (pending[box].length) { } @if (entry.canDelete) { @if (confirmingDeleteId === entry.comment.id) { {{ 'GOALS_PAGE.COMMENT_THREAD.DELETE_CONFIRM' | translate }} } @else { } } @if (entry.authorLink) { } @else { } @if (viewing) { }