<% private_post, content = post_and_content if local_assigns.key?(:post_and_content) %>

<%
  blocked_post = user_signed_in? && private_post.user.present? && private_post.user.blocked_by?(current_user)
%>

<% if blocked_post %>
  <div class='grey-text text-lighten-2'>
    <em class="tooltipped" data-tooltip="This message is hidden because you've blocked the user it's from.">1 message hidden.</em>
  </div>
<% else %>
  <%= render 'thredded/posts_common/before_first_unread_post', post: private_post if private_post.first_unread_in_page? %>
  <%= content_tag :article, id: dom_id(private_post), class: "thredded--post thredded--#{private_post.read_state}--post" do %>
    <%= render 'thredded/posts_common/actions', post: private_post, actions: local_assigns[:actions] %>
    <%= render 'thredded/posts_common/header', post: private_post %>
    <%= content || render('thredded/private_posts/content', post: private_post) %>
  <% end %>
<% end %>