<li class="flex flex-row grow items-center
           m-4 rounded-lg bg-white
           px-2 py-1 my-1"
    id="set-entry-{{ set_id }}"
    hx-get="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
    hx-target="#set-entry-{{ set_id }}"
    hx-swap="outerHTML"
    hx-trigger="reload-set-{{ set_id }}">
  {% if set_entry.temes | length > 1 or not set_entry.temes[0].tema %}
  {% set set_url = "/sessio/%d/set/%d" | format(session_id, set_id) %}
  {% else %}
  {% set set_url = "/tema/%d" | format(set_entry.temes[0].tema_id) %}
  {% endif %}
    {% if logged_in %}
    <div class="flex flex-row grow items-center">
    {% else %}
    <a href="{{ set_url }}"
       class="flex flex-row grow items-center cursor-pointer"
       title="Mostra els temes">
    {% endif %}
   <div class="flex-1"></div>
   <div class="flex flex-col
               items-start
               py-2 mx-2
               w-full max-w-[655px]">
   {% if logged_in %}
     <button class="text-beige w-full"
             hx-delete="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
             hx-target="#set-entry-{{ set_id }}"
             hx-swap="outerHTML">
         <i class="fa fa-times" aria-hidden="true"></i>
         Esborra el set
     </button>
     {% endif %}
     <ol id="set-entry-{{ set_id }}-list"
         class="flex flex-col items-start w-full">
     {% for tema_entry in set_entry.temes %}
       {% if new_entry %}
         {% include "fragments/sessio/tema_editor.html" %}
       {% else %}
         {% include "fragments/sessio/tema_entry.html" %}
       {% endif %}
     {% endfor %}
     </ol>
     {% if logged_in %}
     <button class="text-beige mt-2 w-full"
             hx-post="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
             hx-target="#set-entry-{{ set_id }}-list"
             hx-swap="beforeend transition:true">
         <i class="fa fa-plus" aria-hidden="true"></i>
         Afegeix un tema
     </button>
     {% endif %}
   </div>
   <div class="flex-1 text-beige">
    {% if logged_in %}<a href="{{ set_url }}" class="text-beige">{% endif %}
     <i class="fa fa-chevron-right" aria-hidden="true"></i>
    {% if logged_in %}</a>{% endif %}
   </div>
  {% if logged_in %}</div>{% else %}</a>{% endif %}
</li>
