{% load wagtailadmin_tags i18n %}

<aside class="form-side form-side--initial" aria-label="{% trans 'Side panels' %}" data-form-side{% if in_explorer %} data-form-side-explorer{% endif %}>
    <button type="button" class="form-side__close-button" data-form-side-close-button aria-label="{% trans 'Toggle side panel' %}">
        {% icon name="expand-right" %}
    </button>

    {% for panel in side_panels %}
        <div class="form-side__panel" data-side-panel="{{ panel.name }}" hidden>
            <h2 id="side-panel-{{ panel.name }}-title" class="w-sr-only">{{ panel.title }}</h2>
            {% component panel %}
        </div>
    {% endfor %}
</aside>
{% if not in_explorer %}
    {# Rendering for the minimap is done with React. #}
    <aside aria-label="{% trans 'Minimap' %}" data-minimap-container></aside>
{% endif %}
