<nav class="navbar navbar-expand-lg bg-body-tertiary">
    <div class="container-fluid">
        <a class="navbar-brand" href="{{ path('tvdt_backoffice_index') }}">Tijd voor de test</a>
        <button class="navbar-toggler"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent"
                aria-expanded="false"
                aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                {% if is_granted('IS_AUTHENTICATED') %}
                    <li class="nav-item">
                        <a class="nav-link{% if 'tvdt_backoffice_index' == app.current_route() %} active{% endif %}"
                           href="{{ path('tvdt_backoffice_index') }}">{{ 'Seasons'|trans }}</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link"
                           href="{{ path('tvdt_backoffice_template') }}">{{ 'Download Template'|trans }}</a>
                    </li>
                {% endif %}
            </ul>
            <ul class="navbar-nav mb-auto me-2 me-lg-0">
                <li class="nav-item" data-controller="bo--modal"
                    data-action="turbo:submit-end->bo--modal#frameSubmitEnd">
                    <button type="button" class="nav-link border-0 bg-transparent"
                            data-action="click->bo--modal#open"
                            data-src="{{ path('tvdt_backoffice_releases') }}"
                            data-modal-title="{{ 'Releases'|trans }}">{{ 'Releases'|trans }}</button>

                    <div class="modal fade" tabindex="-1" data-bo--modal-target="modal"
                         data-action="hidden.bs.modal->bo--modal#resetDirty"
                         aria-labelledby="releasesModalLabel" aria-hidden="true">
                        <div class="modal-dialog modal-lg modal-dialog-scrollable">
                            <div class="modal-content">
                                <turbo-frame id="releases-modal-frame" data-bo--modal-target="frame"></turbo-frame>
                            </div>
                        </div>
                    </div>
                </li>
                {% if is_granted('IS_AUTHENTICATED') %}
                    <li class="nav-item">
                        <a class="nav-link{% if 'tvdt_backoffice_settings' == app.current_route() %} active{% endif %}"
                           href="{{ path('tvdt_backoffice_settings') }}">{{ 'Settings'|trans }}</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link"
                           href="{{ path('tvdt_login_logout') }}">{{ 'Logout'|trans }}</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
