<h2>Artist's commentary</h2>

<menu id="commentary-sections">
  <% if artist_commentary.original_present? && artist_commentary.translated_present? %>
    <li><a href="#original">Original</a></li> |
    <li class="active"><a href="#translated">Translated</a></li>
  <% elsif artist_commentary.original_present? %>
    <li><b>Original</b></li>
  <% elsif artist_commentary.translated_present? %>
    <li><b>Translated</b></li>
  <% end %>
</menu>

<% if artist_commentary.original_present? %>
  <%= tag.section id: "original-artist-commentary", style: ("display: none" if artist_commentary.translated_present?) do %>
    <%= format_commentary_title(artist_commentary.original_title) %>
    <%= format_commentary_description(artist_commentary.original_description) %>
  <% end %>
<% end %>

<% if artist_commentary.translated_present? %>
  <section id="translated-artist-commentary">
    <% if artist_commentary.translated_title.present? %>
      <%= format_commentary_title(artist_commentary.translated_title) %>
    <% else %>
      <%= format_commentary_title(artist_commentary.original_title, classes: "inactive") %>
    <% end %>

    <% if artist_commentary.translated_description.present? %>
      <%= format_commentary_description(artist_commentary.translated_description) %>
    <% else %>
      <%= format_commentary_description(artist_commentary.original_description, classes: "inactive") %>
    <% end %>
  </section>
<% end %>
