<% valuation = local_assigns.fetch(:valuation, false) %> <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author] do %>
<% if comment.hidden? %> <% if comment.children.size > 0 %>

<%= t("comments.comment.deleted") %>

<% end %> <% else %> <%= render Comments::AvatarComponent.new(comment) %>
<% if comment.as_administrator? %> <%= t("comments.comment.admin") %> <% if valuation %> <%= Administrator.find(comment.administrator_id).description_or_name %> <% else %> #<%= comment.administrator_id %> <% end %> <% elsif comment.as_moderator? %> <%= t("comments.comment.moderator") %> #<%= comment.moderator_id %> <% else %> <% if comment.user.hidden? || comment.user.erased? %> <%= t("comments.comment.user_deleted") %> <% else %> <%= link_to comment.user.name, user_path(comment.user) %> <% if comment.user.display_official_position_badge? %>  •  <%= comment.user.official_position %> <% end %> <% end %> <% if comment.user.verified_organization? %>  •  <%= t("shared.collective") %> <% end %> <% if comment.user_id == comment.commentable.author_id %>  •  <%= t("comments.comment.author") %> <% end %> <% end %>  •  <%= link_to comment_path(comment) do %> <%= l comment.created_at.to_datetime, format: :datetime %> <% end %>
<%= simple_format sanitize_and_auto_link(comment.body), {}, sanitize: false %>
<% unless valuation %>
<%= render Comments::VotesComponent.new(comment) %>
<% end %> <%= render "comments/responses_count", count: comment.children.size %> <% if user_signed_in? && !comments_closed_for_commentable?(comment.commentable) && !require_verified_resident_for_commentable?(comment.commentable, current_user) %>  |  <%= link_to(comment_link_text(comment), "", class: "js-add-comment-link", data: { id: dom_id(comment) }) %> <% unless valuation %> <%= render "comments/actions", { comment: comment } %> <% end %> <% if !valuation || can?(:comment_valuation, comment.commentable) %> <%= render Comments::FormComponent.new(comment.commentable, parent_id: comment.id, valuation: valuation) %> <% end %> <% end %>
<% end %>
<%= render "comments/comment_list", comments: child_comments_of(comment), valuation: valuation %>
<% end %>