{% extends 'admin/base.html' %}
{% load i18n unfold static arith %}

{% block title %}
    {% if subtitle %}
        {{ subtitle }} |
    {% endif %}

    {{ title }} | {{ site_title|default:_('Django site admin') }}
{% endblock %}

{% block branding %}
    {% include "unfold/helpers/site_branding.html" %}
{% endblock %}

{% block content %}
    {% component "unfold/components/container.html" %}
        <div class="flex flex-col min-h-screen">
            {% component "unfold/components/title.html" %}
                {% include "admin/dashboard/_header.html" %}
            {% endcomponent %}

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_kpis.html" %}
            </div>

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_low_stock.html" %}
            </div>

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_most_returned.html" %}
            </div>

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_customers_mix.html" %}
            </div>

            {% if shipped_vs_digital.digital_qty|default:0 > 0 and shipped_vs_digital.shipped_qty|default:0 > 0 %}
                <div class="mt-6 md:mt-8">
                    {% include "admin/dashboard/_shipped_vs_digital.html" %}
                </div>
            {% endif %}

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_top_categories.html" %}
            </div>

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_product_lists.html" %}
            </div>

            <div class="mt-6 md:mt-8">
                {% include "admin/dashboard/_daily_sales.html" %}
            </div>

            {% component "unfold/components/separator.html" %}{% endcomponent %}

            <div class="mt-4 mt-auto">
                {% component "unfold/components/text.html" with class="text-center text-xs text-gray-500 dark:text-gray-400" %}
                    eVibes {{ evibes_version }} · Wiseless Team
                {% endcomponent %}
            </div>

        </div>
    {% endcomponent %}
{% endblock %}