<div>
  <%# render 'content/form/errors', content: @content %>

  <%# Content panels %>
  <%
    categories = if content.is_a?(ContentSerializer)
      content.data[:categories]
    else
      raise [@content.class.name, @content.id, @content.errors.messages] if !@content.valid? && @serialized_categories_and_fields == nil

      @serialized_categories_and_fields.data
    end
  %>
  <% categories.each do |category| %>
    <%=
      render partial: 'content/form/panel', locals: {
        category: category, 
        content:  content
      }
    %>
  <% end %>
</div>

<div class="center grey-text">
  <%# todo rotating tips here? %>
  Tip: Notebook.ai automatically saves your answers.
</div>