{#
/**
 * @file
 * Unified dashboard range selector component.
 *
 * Available variables:
 * - items: Available selector items.
 *   Each item may contain:
 *   - key: Internal range key.
 *   - label: Visible label.
 *   - title: Accessible title.
 *   - is_active: Whether the item is active.
 *   - url: Target URL with the selected range query parameter.
 */
#}

{% if items is not empty %}
  <nav class="no-range-selector" aria-label="{{ 'Select time range'|t }}">
    <div class="no-range-selector__wrapper">
      {% for item in items %}
        <a
          href="{{ item.url }}"
          class="no-range-selector__item{{ item.is_active ? ' is-active' : '' }}"
          title="{{ item.title|default(item.label) }}">
          {{ item.label }}
        </a>
      {% endfor %}
    </div>
  </nav>
{% endif %}
