{#
/**
 * @file
 * Default template for the Native Observability status block.
 *
 * Available variables:
 * - title: Block title.
 * - variant: Rendering variant (e.g. compact, detailed).
 * - capture: Capture summary and raw settings.
 * - retention: Retention policy info.
 * - warnings: Array of warning strings.
 * - meta: Optional meta data.
 */
#}

<div class="native-observability-status-block native-observability-status-block--{{ variant|clean_class }}">
  <div class="native-observability-status-block__header">
    <strong>{{ title }}</strong>
    {% if capture.enabled %}
      <span class="native-observability-status-block__pill">{{ 'Enabled'|t }}</span>
    {% else %}
      <span class="native-observability-status-block__pill">{{ 'Disabled'|t }}</span>
    {% endif %}
  </div>

  {% if capture.summary is not empty %}
    <ul class="native-observability-status-block__list">
      {% for item in capture.summary %}
        <li>{{ item }}</li>
      {% endfor %}
    </ul>
  {% endif %}

  {% if retention.days is defined or retention.max_rows is defined %}
    <div class="native-observability-status-block__retention">
      {% if retention.days is defined %}
        <div>{{ 'Retention (days): @d'|t({'@d': retention.days}) }}</div>
      {% endif %}
      {% if retention.max_rows is defined %}
        <div>{{ 'Max rows: @m'|t({'@m': retention.max_rows}) }}</div>
      {% endif %}
    </div>
  {% endif %}

  {% if warnings is not empty %}
    <div class="native-observability-status-block__warning" role="note">
      <strong>{{ 'Warnings'|t }}</strong>
      <ul class="native-observability-status-block__list">
        {% for w in warnings %}
          <li>{{ w }}</li>
        {% endfor %}
      </ul>
    </div>
  {% endif %}
</div>
