{% load unfold i18n %}

<div class="flex flex-row grow font-semibold items-center min-w-0 mr-3">
    <span class="cursor-pointer flex flex-row items-center">
        <span class="material-symbols-outlined hidden! xl:block!" hx-get="{% url "admin:toggle_sidebar" %}" hx-swap="none" x-on:click="sidebarDesktopOpen = !sidebarDesktopOpen">
            dock_to_right
        </span>

        <span class="material-symbols-outlined block! xl:hidden!" x-on:click="sidebarMobileOpen = !sidebarMobileOpen">
            dock_to_right
        </span>
    </span>

    <span class="block bg-base-200 h-5 mx-3 w-px dark:bg-base-700"></span>

    {% include "unfold/helpers/header_back_button.html" %}

    <h1 class="overflow-hidden text-ellipsis text-sm whitespace-nowrap xl:text-base text-font-important-light dark:text-font-important-dark">
        {% if content_title %}
            <span class="tracking-tight">
                {{ pretitle }}

                {{ content_title }}
            </span>

            {% if cl and cl.full_result_count != cl.result_count and cl.paginator|class_name != "InfinitePaginator" %}
                <span class="font-medium ml-2 text-font-subtle-light text-sm dark:text-font-subtle-dark">
                    {% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)
                </span>
            {% endif %}

            {% if content_subtitle %}
                {{ content_subtitle }}
            {% endif %}
        {% else %}
            {% translate 'Welcome,' %} <strong>{% firstof user.get_short_name user.get_username %}</strong>.
        {% endif %}
    </h1>
</div>
