{% extends "base.html" %}

{% block content %}
<div class="container py-4">
    <!-- Заголовок -->
    <h2 class="mb-4">⚙️ Настройки</h2>

    <!-- Навигация через вкладки -->
    <ul class="nav nav-tabs mb-4" role="tablist">
        <li class="nav-item" role="presentation">
            <a class="nav-link {% if request.resolver_match.url_name == 'settings' %}active{% endif %}"
               href="{% url 'system_settings:settings' %}">
                Системные настройки
            </a>
        </li>
        <li class="nav-item" role="presentation">
            <a class="nav-link {% if 'user_roles' in request.resolver_match.namespaces %}active{% endif %}"
               href="{% url 'system_settings:user_roles:list' %}">
                Роли пользователей
            </a>
        </li>
        <li class="nav-item" role="presentation">
            <a class="nav-link {% if 'discounts' in request.resolver_match.namespaces %}active{% endif %}"
               href="{% url 'system_settings:discounts:list' %}">
                <i class="bi bi-tag"></i> Скидки
            </a>
        </li>
        <li class="nav-item" role="presentation">
            <a class="nav-link {% if 'integrations' in request.resolver_match.namespaces %}active{% endif %}"
               href="{% url 'system_settings:integrations:list' %}">
                Интеграции
            </a>
        </li>
    </ul>

    <!-- Контент конкретной страницы настроек -->
    {% block settings_content %}
    {% endblock %}
</div>
{% endblock %}
