<div class="node-result">
  <h5>{{ result.metadata.name }}</h5>
  <p class="text-muted">Type: <code>Map</code></p>

  {% if result.metadata.model_name %}
  <p><strong>Model:</strong> <code>{{ result.metadata.model_name }}</code></p>
  {% endif %}

  <p><strong>Number of items processed:</strong> {{ result.metadata.num_items }}</p>

  {% if result.data is defined and not result.data.empty %}
  <details>
    <summary><strong>Mapped Results</strong> (click to expand)</summary>
    <div class="mt-2">
      {{ result.data|df_to_html|safe }}
    </div>
  </details>
  {% else %}
  <p><em>No results</em></p>
  {% endif %}
</div>
