section.comments
    .comments-wrapper
        tg-comment.comment(
            ng-repeat="comment in vm.comments track by comment.id"
            ng-class="{'deleted-comment': comment.delete_comment_date}"
            comment="comment"
            name="{{vm.name}}"
            loading="vm.loading"
            editing="vm.editing"
            deleting="vm.deleting"
            object="{{vm.object}}"
            edit-mode="vm.editMode[comment.id]"
            on-edit-mode="vm.onEditMode({commentId: commentId})"
            on-delete-comment="vm.onDeleteComment({commentId: commentId})"
            on-restore-deleted-comment="vm.onRestoreDeletedComment({commentId: commentId})"
            on-edit-comment="vm.onEditComment({commentId: commentId, commentData: commentData, callback: callback})"
        )

    tg-comment-wysiwyg(
        tg-check-permission="{{::vm.canAddCommentPermission}}"
        on-update="updateComment(text)"
        type="vm.type"
    )
