{% import "macros/image.nunj" as img %}

<div class="browser-controls list--inline nav">
    <ul class="browser-tabs">
        {% for panel in frctl.theme.get('panels') %}
            {% if panel == 'resources' %}
                {% for collection in entity.resources().items() %}
                    {% if collection.size %}
                    <li data-role="tab">
                        <a href="#browser-{{ entity.id }}-panel-{{ collection.name }}">{{ collection.label }}</a>
                    </li>
                    {% endif %}
                {% endfor %}
            {% else %}
                <li class="{% if loop.first %} is-active {% endif %}" data-role="tab">
                    <a href="#browser-{{ entity.id }}-panel-{{ panel }}">
                        {% if panel == 'html' %}
                            HTML
                        {% elif panel == 'notes' %}
                            Docs
                        {% else %}
                            {{ panel | capitalize }}
                        {% endif %}
                    </a>
                </li>
            {% endif %}
        {% endfor %}
    </ul>
</div>
