{#
/**
 * @file
 * Component for a breadcrumb trail.
 *
 * Variables:
 * - modifier_class: [string] Classes to modify the default component styling.
 * - heading: [string] Accessible heading.
 * - breadcrumb: [array] The breadcrumb trail items. Each item is an object
 *   containing:
 *   - text: [string] Text of the item.
 *   - url: [string] URL of the item (optional).
 */
#}
<nav class="breadcrumb {{modifier_class}}" role="navigation" aria-labelledby="system-breadcrumb">
  <h2 class="visually-hidden">{{ heading|default('You are here') }}</h2>
  <ol class="breadcrumb__list">
    {% for item in breadcrumb %}
      <li class="breadcrumb__item">
        {% if item.url %}
          <a class="breadcrumb__link" href="{{ item.url }}">{{ item.text }}</a>
        {% else %}
          {{ item.text }}
        {% endif %}
        {% if not loop.last %}
          ›
        {% endif %}
      </li>
    {% endfor %}
  </ol>
</nav>
