{% load i18n wagtailadmin_tags %}
{% if items %}
    {% if is_searching %}
        <h2 role="alert">
            {% blocktrans trimmed count counter=items.paginator.count %}
                There is {{ counter }} match
            {% plural %}
                There are {{ counter }} matches
            {% endblocktrans %}
        </h2>
    {% endif %}

    {% component table %}

    {% url 'wagtailsnippets:choose_results' model_opts.app_label model_opts.model_name as pagination_base_url %}
    {% include "wagtailadmin/shared/pagination_nav.html" with items=items linkurl=pagination_base_url %}
{% else %}
    {% if is_searching %}
        <p role="alert">{% blocktrans trimmed %}Sorry, no snippets match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
    {% else %}
        {% url 'wagtailsnippets:add' model_opts.app_label model_opts.model_name as wagtailsnippets_create_snippet_url %}
        <p>{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}You haven't created any {{ snippet_type_name }} snippets. Why not <a href="{{ wagtailsnippets_create_snippet_url }}" target="_blank" rel="noreferrer">create one now</a>?{% endblocktrans %}</p>
    {% endif %}
{% endif %}
