{% load i18n admin_urls unfold %}

{% if is_popup %}
    <div class="flex flex-row items-center">
        <h1 class="font-semibold overflow-hidden my-6 text-ellipsis whitespace-nowrap text-base text-font-important-light dark:text-font-important-dark">
            <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 %}
        </h1>

        <div class="ml-auto">
            {% include "unfold/helpers/add_link.html" with hide_separator=True %}
        </div>
    </div>
{% endif %}
