{% load i18n %}

<script type="application/javascript">
    let taxsystemsettings = {
        // Core
        csrf: "{{ csrf_token }}",
        {% if corporation_id %}
            // URLs
            DashboardUrl: '{% url "taxsystem:api:get_dashboard" corporation_id=corporation_id %}',
            PaymentsUrl: '{% url "taxsystem:api:get_payments" corporation_id=corporation_id %}',
            OwnPaymentsUrl: '{% url "taxsystem:api:get_own_payments" corporation_id=corporation_id %}',
            MembersUrl: '{% url "taxsystem:api:get_members" corporation_id=corporation_id %}',
            PaymentSystemUrl: '{% url "taxsystem:api:get_paymentsystem" owner_id=corporation_id %}',
            // Update URLs
            UpdateTaxUrl: '{% url "taxsystem:update_tax_amount" owner_id=corporation_id %}',
            UpdatePeriodUrl: '{% url "taxsystem:update_tax_period" owner_id=corporation_id %}',
        {% endif %}

        {% if alliance_id %}
            // URLs
            DashboardUrl: '{% url "taxsystem:api:get_alliance_dashboard" alliance_id=alliance_id %}',
            PaymentsUrl: '{% url "taxsystem:api:get_alliance_payments" alliance_id=alliance_id %}',
            OwnPaymentsUrl: '{% url "taxsystem:api:get_alliance_own_payments" alliance_id=alliance_id %}',
            MembersUrl: '{% url "taxsystem:api:get_alliance_members" alliance_id=alliance_id %}',
            PaymentSystemUrl: '{% url "taxsystem:api:get_paymentsystem" owner_id=alliance_id %}',
            // Update URLs
            UpdateTaxUrl: '{% url "taxsystem:update_tax_amount" owner_id=alliance_id %}',
            UpdatePeriodUrl: '{% url "taxsystem:update_tax_period" owner_id=alliance_id %}',
        {% endif %}
        // Translations
        translations: {
            days: '{% translate "days" %}',
            enterTaxAmount: "{% translate 'Enter Tax Amount' %}",
            enterTaxPeriod: "{% translate 'Enter Tax Period' %}",
            internalServerError: "{% translate 'Internal Server Error' %}",
            hasPaid: "{% translate 'Tax Paid' %}",
        }
    };
</script>
