<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:p="http://primefaces.org/ui" xmlns:fr="http://primefaces.org/freya">

    <!--
        Composant réutilisable: Menu Navigation (WOU/DRY Pattern)
        
        Auteur: Lions User Manager
        Version: 1.0.0
        Description: Menu de navigation latéral pour Lions User Manager
    -->

    <div class="menu-wrapper">
        <div class="sidebar-logo">
            <a href="/pages/user-manager/dashboard">
                <p:graphicImage name="images/logo-freya-single.svg" library="freya-layout" />
            </a>
            <a href="#" class="sidebar-pin" title="Toggle Menu">
                <span class="pin"></span>
            </a>
        </div>
        <div class="layout-menu-container">
            <h:form id="menuform">
                <fr:menu widgetVar="FreyaMenuWidget">
                    <!-- Dashboard -->
                    <p:menuitem id="m_dashboard" value="Tableau de Bord" icon="pi pi-home"
                        outcome="/pages/user-manager/dashboard" />

                    <!-- Gestion Utilisateurs -->
                    <p:submenu id="m_users" label="Gestion Utilisateurs" icon="pi pi-users">
                        <p:menuitem id="m_users_list" value="Liste des Utilisateurs" icon="pi pi-list"
                            outcome="/pages/user-manager/users/list" />
                        <p:menuitem id="m_users_create" value="Nouvel Utilisateur" icon="pi pi-user-plus"
                            outcome="/pages/user-manager/users/create" />
                    </p:submenu>

                    <!-- Gestion Rôles -->
                    <p:submenu id="m_roles" label="Gestion Rôles" icon="pi pi-shield">
                        <p:menuitem id="m_roles_list" value="Liste des Rôles" icon="pi pi-list"
                            outcome="/pages/user-manager/roles/list" />
                    </p:submenu>

                    <!-- Audit -->
                    <p:submenu id="m_audit" label="Audit" icon="pi pi-history">
                        <p:menuitem id="m_audit_logs" value="Journal d'Audit" icon="pi pi-file-o"
                            outcome="/pages/user-manager/audit/logs" />
                    </p:submenu>

                    <!-- Synchronisation -->
                    <p:submenu id="m_sync" label="Synchronisation" icon="pi pi-sync">
                        <p:menuitem id="m_sync_dashboard" value="Dashboard" icon="pi pi-dashboard"
                            outcome="/pages/user-manager/sync/dashboard" />
                    </p:submenu>
                </fr:menu>
            </h:form>
        </div>
    </div>

</ui:composition>