<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">

    <!--
        Composant réutilisable: Topbar (WOU/DRY Pattern)
        
        Auteur: Lions User Manager
        Version: 1.0.0
        Description: Barre supérieure avec logo, menu et profil utilisateur
    -->

    <div class="layout-topbar">
        <div class="layout-topbar-wrapper">
            <div class="layout-topbar-left">
                <a href="#" class="menu-button">
                   <i class="pi pi-bars"/>
                </a>
                <h:link id="logolink" outcome="/pages/user-manager/dashboard" styleClass="layout-topbar-logo">
                    <p:graphicImage name="images/#{guestPreferences.lightLogo ? 'logo-freya-white.svg' : 'logo-freya.svg'}" library="freya-layout" />
                </h:link>
            </div>
           
            <ui:include src="/templates/components/layout/menu.xhtml" />
           
            <div class="layout-topbar-right">
                <ul class="layout-topbar-actions">
                    <li class="topbar-item user-profile">
                        <a href="#" title="Profil utilisateur">
                            <div class="flex align-items-center">
                                <div class="bg-primary text-white border-round flex align-items-center justify-content-center mr-2" 
                                     style="width: 32px; height: 32px; font-size: 12px; font-weight: bold;">
                                    <i class="pi pi-user"></i>
                                </div>
                                <div class="text-sm">
                                    <div class="text-900 font-medium">Utilisateur</div>
                                    <div class="text-600 text-xs">Connecté</div>
                                </div>
                            </div>
                        </a>
                        <ul>
                            <li>
                                <a href="/pages/user-manager/users/profile">
                                    <i class="pi pi-user mr-2"></i>
                                    <span>Mon Profil</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="pi pi-cog mr-2"></i>
                                    <span>Paramètres</span>
                                </a>
                            </li>
                            <li class="border-top-1 surface-border">
                                <a href="#" class="text-red-600">
                                    <i class="pi pi-sign-out mr-2"></i>
                                    <span>Déconnexion</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>

</ui:composition>

