{% load i18n %}

{% if app_list %}
<style>
    .sidebar-item ::marker{
        display: none;
    }
</style>
<div id="accordionExample" style="background: #222e3c;">
    {% for app in app_list %}
        <li class="sidebar-header app-{{ app.app_label }} {% if app.app_url in request.path|urlencode %} current-app{% endif %}">
            <a href="{{ app.app_url }}" style="color: white;"  title="{% blocktranslate with name=app.name %}Models in the {{ name }} application{% endblocktranslate %}">
                {{ app.name }}
            </a>
            <a href="#" data-bs-toggle="collapse" data-bs-target="#collapse{{ app.app_label }}" aria-expanded="true" aria-controls="collapse{{ app.app_label }}" >abrir</a>
        </li>
        <div id="collapse{{ app.app_label }}" class="collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style="">
        {% for model in app.models %}
            <li class="sidebar-item {% if model.admin_url in request.path|urlencode %}active{% endif %}">
                {% if model.admin_url %}
                    <a class="sidebar-link" href="{{ model.admin_url }}" >
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sliders align-middle"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg><span class="align-middle">{{ model.name }}</span>
                    </a>
                {% else %}
                {% endif %}
            </li>
        {% endfor %}
        </div>
    {% endfor %}
</div>
{% else %}
  <p>{% translate 'You don’t have permission to view or edit anything.' %}</p>
{% endif %}