<li class="flex flex-row grow items-center
           m-4 rounded-lg bg-white
           px-2 py-1 my-1"
    id="set-entry-{{ playlist_id }}-{{ set_id }}"
hx-get="/api/llista/{{ playlist_id }}/set/{{ set_id }}"
     hx-target="#set-entry-{{ playlist_id }}-{{ set_id }}"
     hx-swap="outerHTML"
     hx-trigger="reload-set-{{ playlist_id }}-{{ set_id }}">
  {% if set_entry.temes | length > 1 or not set_entry.temes[0].tema %}
  {% set set_url = "/llista/%d/set/%d" | format(playlist_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/llista/{{ playlist_id }}/set/{{ set_id }}"
              hx-target="#set-entry-{{ playlist_id }}-{{ set_id }}"
              hx-swap="outerHTML">
          <i class="fa fa-times" aria-hidden="true"></i>
          Esborra el set
      </button>
      {% endif %}
      <ol id="set-entry-{{ playlist_id }}-{{ set_id }}-list"
          class="flex flex-col items-start w-full">
      {% for tema_entry in set_entry.temes %}
        {% if new_entry %}
          {% include "fragments/llista/tema_editor.html" %}
        {% else %}
          {% include "fragments/llista/tema_entry.html" %}
        {% endif %}
      {% endfor %}
      </ol>
      {% if logged_in %}
      <button class="text-beige mt-2 w-full"
              hx-post="/api/llista/{{ playlist_id }}/set/{{ set_id }}"
             hx-target="#set-entry-{{ playlist_id }}-{{ 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>
