{# Detailed variant extends the default output with raw capture modes. #}

<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.raw is not empty %}
    <div class="native-observability-status-block__details">
      <h4>{{ 'Capture configuration'|t }}</h4>
      <ul class="native-observability-status-block__list">
        {% for k, v in capture.raw %}
          <li><strong>{{ k }}</strong>: {{ v is iterable ? v|json_encode : v }}</li>
        {% endfor %}
      </ul>
    </div>
  {% endif %}

  {% if retention.days is defined or retention.max_rows is defined %}
    <div class="native-observability-status-block__retention">
      <h4>{{ 'Retention'|t }}</h4>
      {% 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>
