{% extends 'allianceauth/base-bs5.html' %}
{% load i18n %}
{% load navactive %}

{% block page_title %}
    {% trans "Market Tracker Plugin" %}
{% endblock %}

{% block header_nav_brand %}
    {% trans "Market Tracker Plugin" %}
{% endblock header_nav_brand %}

{% block header_nav_collapse_left %}
    {{ block.super }}
    <a
        class="nav-link {% navactive request 'markettracker:list_items' %}"
        href="{% url 'markettracker:list_items' %}"
    >
        {% trans "List Items" %}
    </a>
    {% if perms.markettracker.can_manage_stocks %}
    <a
        class="nav-link {% navactive request 'markettracker:contracts_list' %}"
        href="{% url 'markettracker:contracts_list' %}"
    >
        {% trans "Contracts list" %}
    </a>
    <a
        class="nav-link {% navactive request 'markettracker:manage_stock' %}"
        href="{% url 'markettracker:manage_stock' %}"
    >
        {% trans "Manage Stock" %}
    </a>
    {% endif %}
    <a
        class="nav-link {% navactive request 'markettracker:deliveries_list' %}"
        href="{% url 'markettracker:deliveries_list' %}"
    >
        {% trans "Deliveries" %}
    </a>
    {% if perms.markettracker.can_manage_deliveries %}
    <a
        class="nav-link {% navactive request 'markettracker:admin_deliveries' %}"
        href="{% url 'markettracker:admin_deliveries' %}"
    >
        {% trans "Manage Deliveries" %}
    </a>
    {% endif %}
<!--
    <a
        class="nav-link {% navactive request 'markettracker:contract_errors' %}"
        href="{% url 'markettracker:contract_errors' %}"
    >
        {% trans "Errors" %}
    </a>
-->
{% endblock header_nav_collapse_left %}

{% block content %}
    <div class="allianceauth-markettracker-plugin">
        {% block details %}{% endblock %}
    </div>
{% endblock %}

{% block extra_javascript %}
    {{ block.super }}
    <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
    <script>
        $(document).ready(function() {
            $('.select-search').select2({
                width: '100%',
            });
        });
    </script>
{% endblock %}

{% block extra_css %}

<style>
.select2-container--default .select2-selection--single {
    background-color: #fff !important;
    color: #000 !important;
}
.select2-container--default .select2-results__option {
    color: #000 !important;
}
</style>
{% endblock %}
