{% from "macros/ui.html" import status_badge, action_buttons %}
<tr class="ht-instance-row"
    x-show="expanded['{{ manifest.app_key }}'] ?? true"
    x-transition>
  <td class="ht-pl-6">
    <a href="/ui/apps/{{ manifest.app_key }}/{{ inst.index }}"><code>{{ inst.instance_name }}</code></a>
  </td>
  <td></td>
  <td></td>
  <td>{{ status_badge(inst.status, size="small") }}</td>
  <td>
    {% if inst.error_message %}
      <span class="ht-text-danger ht-text-xs">{{ inst.error_message }}</span>
    {% else %}
      —
    {% endif %}
  </td>
  <td>
    {{ action_buttons(manifest.app_key, inst.status, after_action="htmx.ajax('GET', '/ui/partials/manifest-list', {target: '#manifest-list', swap: 'innerHTML'})", show_labels=false) }}
  </td>
</tr>
