{% extends '_admin/base.html.twig' %}

{% block admin_space %}platform{% endblock %}
{% block title %}Plateforme | SALSABIL Madrassas{% endblock %}
{% block brand_title %}SALSABIL{% endblock %}
{% block brand_subtitle %}Gestion des madrassas{% endblock %}
{% block mobile_brand_title %}SALSABIL{% endblock %}
{% block mobile_brand_subtitle %}Gestion des madrassas{% endblock %}
{% block brand_link %}{{ path('platform_dashboard') }}{% endblock %}
{% block user_meta %}Super-administrateur{% endblock %}
{% block search_placeholder %}Rechercher une madrassa ou un étudiant...{% endblock %}

{% block sidebar_items %}
    {% set route = app.request.attributes.get('_route') %}
    {% include 'components/admin/sidebar_link.html.twig' with {href: path('platform_dashboard'), icon: 'dashboard', label: 'Tableau de bord', active: route == 'platform_dashboard'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {href: path('platform_ecole_index'), icon: 'account_balance', label: 'Madrassas', active: route starts with 'platform_ecole_'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'fact_check', label: 'Inscriptions'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'group', label: 'Étudiants'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'payments', label: 'Paiements'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {href: path('platform_theme_index'), icon: 'palette', label: 'Thèmes', active: route starts with 'platform_theme_'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'manage_accounts', label: 'Utilisateurs'} %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'analytics', label: 'Statistiques'} %}
{% endblock %}

{% block sidebar_cta %}
    <a class="admin-primary-cta" href="{{ path('platform_ecole_new') }}">
        <span class="material-symbols-outlined">add_circle</span>
        <span>Ajouter une madrassa</span>
    </a>
{% endblock %}

{% block sidebar_footer_links %}
    {% include 'components/admin/sidebar_link.html.twig' with {icon: 'settings', label: 'Paramètres'} %}
    <a class="admin-nav-link admin-nav-link-danger" href="{{ path('app_logout') }}">
        <span class="material-symbols-outlined">logout</span>
        <span>Déconnexion</span>
    </a>
{% endblock %}
