{% extends "sovtimer/base.html" %}

{% load i18n %}

{% block sovtimer_body %}
    {% include "sovtimer/partials/dashboard/table.html" %}
{% endblock %}

{% block extra_css %}
    {% include "bundles/datatables-css-bs5.html" %}
    {% include "sovtimer/bundles/aa-sov-timer-css.html" %}
{% endblock %}

{% block extra_javascript %}
    {% translate "Type" as dtFilterType %}
    {% translate "System" as dtFilterSystem %}
    {% translate "Constellation" as dtFilterConstellation %}
    {% translate "Region" as dtFilterRegion %}
    {% translate "Owner / Defender" as dtFilterOwner %}
    {% translate "Active campaign" as dtFilterActiveCampaign %}
    {% translate "Yes" as yes %}
    {% translate "No" as no %}

    <script>
        const sovtimerJsSettingsOverride = {
            url: {
                ajaxUpdate: '{% url "sovtimer:dashboard_data" %}'
            },
            translation: {
                dtFilter: {
                    type: '{{ dtFilterType|escapejs }}',
                    system: '{{ dtFilterSystem|escapejs }}',
                    constellation: '{{ dtFilterConstellation|escapejs }}',
                    region: '{{ dtFilterRegion|escapejs }}',
                    owner: '{{ dtFilterOwner|escapejs }}',
                    activeCampaign: '{{ dtFilterActiveCampaign|escapejs }}',
                },
                yes: '{{ yes|escapejs }}',
                no: '{{ no|escapejs }}',
            },
            upcomingTimerThreshold: 4 * 60 * 60, // 4 hours in seconds
        };
    </script>

    {% include "bundles/moment-js.html" with locale=True %}
    {% include "bundles/datatables-js-bs5.html" %}
    {% include "bundles/filterdropdown-js.html" %}
    {% include "sovtimer/bundles/aa-sov-timer-js.html" %}
{% endblock %}
