{% if not is_popup %}
    {% if tab_list or actions_list or actions_detail or actions_items or nav_global %}
        <div class="flex items-start flex-col mb-4 text-gray-500 text-sm w-full md:border-b dark:md:border-gray-800 md:border-l-0 md:flex-row md:items-center md:justify-end dark:text-gray-400">
            {% if tab_list %}
                <ul class="border rounded-md flex flex-col w-full md:flex-row md:border-b-0 md:border-t-0 md:border-l-0 md:border-r-0 dark:border-gray-800">
                    {% for item in tab_list %}
                        {% if item.has_permission %}
                            <li class="border-b last:border-b-0 md:border-b-0 md:mr-8 dark:border-gray-800">
                                <a href="{{ item.link }}" class="block px-3 py-2 {% if item.link|stringformat:"s" in request.path %} border-b md:border-primary-500 dark:md:border-primary-600 font-medium -mb-px text-primary-600 hover:text-primary-600 dark:text-primary-500{% else %} hover:text-gray-700 dark:hover:text-gray-200{% endif %} md:py-4 md:px-0 dark:border-gray-800">
                                    {{ item.title }}
                                </a>
                            </li>
                        {% endif %}
                    {% endfor %}
                </ul>
            {% endif %}

            {% if actions_list or actions_detail or actions_items or nav_global %}
                <ul class="border flex flex-col mb-4 mt-2 rounded-md shadow-sm md:flex-row md:mb-2 md:mt-0 dark:border-gray-800 max-md:w-full">
                    {% for action in actions_list %}
                        {% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
                    {% endfor %}

                    {% for action in actions_detail %}
                        {% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
                    {% endfor %}

                    {% if actions_items %}
                        {{ actions_items }}
                    {% endif %}

                    {% if nav_global %}
                        {{ nav_global }}
                    {% endif %}
                </ul>
            {% endif %}
        </div>
    {% endif %}

{% endif %}
