<!-- START of Symfony Web Debug Toolbar -->
{% if 'normal' != position %}
    <div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" data-no-turbolink>
        <a href="javascript:void(0);" title="Show Symfony toolbar" tabindex="-1" accesskey="D" onclick="
            var elem = this.parentNode;
            if (elem.style.display == 'none') {
                document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'none';
                document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'none';
                elem.style.display = 'block';
            } else {
                document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'block';
                document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'block';
                elem.style.display = 'none'
            }

            Sfjs.setPreference('toolbar/displayState', 'block');
        ">
            {{ include('@WebProfiler/Icon/symfony.svg') }}
        </a>
    </div>
    <style>
        {{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
    </style>
    <div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 36px;"></div>
{% endif %}

<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset clear-fix" data-no-turbolink>
    {% for name, template in templates %}
        {% if block('toolbar', template) is defined %}
            {% with {
                collector: profile.getcollector(name),
                profiler_url: profiler_url,
                token: profile.token,
                name: name,
                profiler_markup_version: profiler_markup_version
              } %}
                {{ block('toolbar', template) }}
            {% endwith %}
        {% endif %}
    {% endfor %}

    {% if 'normal' != position %}
        <a class="hide-button" title="Close Toolbar" tabindex="-1" accesskey="D" onclick="
            var p = this.parentNode;
            p.style.display = 'none';
            (p.previousElementSibling || p.previousSibling).style.display = 'none';
            document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
            Sfjs.setPreference('toolbar/displayState', 'none');
        ">
            {{ include('@WebProfiler/Icon/close.svg') }}
        </a>
    {% endif %}
</div>
<!-- END of Symfony Web Debug Toolbar -->
