{{ define "fragments/comment/commentList" }}
{{ range $item := .CommentList }} {{ template "commentListItem" (list $ .) }} {{ end }}
{{ end }} {{ define "commentListItem" }} {{ $root := index . 0 }} {{ $item := index . 1 }}
{{ template "topLevelComment" (dict "LoggedInUser" $root.LoggedInUser "Reactions" (index (asReactionMapMap $root.Reactions) $item.Self.FeedCommentAtUri) "UserReacted" (index (asReactionStatusMapMap $root.UserReacted) $item.Self.FeedCommentAtUri) "VouchRelationship" (index $root.VouchRelationships $item.Self.Did) "Comment" $item.Self) }}
{{ range $index, $reply := $item.Replies }}
{{ template "replyComment" (dict "LoggedInUser" $root.LoggedInUser "Reactions" (index (asReactionMapMap $root.Reactions) $reply.FeedCommentAtUri) "UserReacted" (index (asReactionStatusMapMap $root.UserReacted) $reply.FeedCommentAtUri) "VouchRelationship" (index $root.VouchRelationships $reply.Did) "Comment" $reply) }}
{{ end }}
{{ template "fragments/comment/replyPlaceholder" (dict "LoggedInUser" $root.LoggedInUser) }}
{{ end }} {{ define "topLevelComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did.String "size-8 mr-1" .VouchRelationship) }}
{{ template "fragments/comment/commentHeader" . }} {{ template "fragments/comment/commentBody" . }}
{{ end }} {{ define "replyComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did.String "size-8 mr-1" .VouchRelationship) }}
{{ template "fragments/comment/commentHeader" . }} {{ template "fragments/comment/commentBody" . }}
{{ end }}