<% rich_text_content = render_rich_text_content(log_entry) %>
<%= sky_section_tag(
  pretty_content_type(log_entry.content_type),
  collapsible: rich_text_content.present?,
  initially_collapsed: rich_text_content.present?,
  font_size_adjustable: rich_text_content.present?,
) do %>
  <% if rich_text_content.present? %>
    <div class="bg-slate-100 p-4 indent-4 font-medium font-serif rich-text-content">
      <%= rich_text_content %>
    </div>
  <% else %>
    <div class="bg-slate-100 p-4 text-slate-500 italic text-center">
      <span>Error rendering document</span>
    </div>
  <% end %>
<% end %>
