{% load lineup_tags %}
{% spaceless %}
{% comment %}
    item is a dictionary:
    - instance: MenuItem instance
    - parent: the parent item
    - children: list of child items
    - active: whether the item is active or not
    - has_active: whether the item contains an active item or not
{% endcomment %}
{% if items|length %}
    <ul id="lineup-{{ slug }}" class="level-{{ level }}">
        {% for item in items %}
            <li class="{% if item.active %}active {% elif item.has_active %}has-active {% endif %}{% if item.children|length %}has-children {% endif %}">
                <a{% if item.instance.link %} href="{{ item.instance.link }}"{% endif %}{% if item.instance.title %} title="{{ item.instance.title }}"{% endif %}>{{ item.instance.label }}</a>
                {% lineup_menu item %}
            </li>
        {% endfor %}
    </ul>
{% endif %}
{% endspaceless %}
