<!-- -------------------------------------------------------------- -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- -------------------------------------------------------------- -->
<header class="topbar">
	<nav class="navbar top-navbar navbar-expand-md navbar-dark">
		<div class="navbar-header border-end">
			<!-- This is for the sidebar toggle which is visible on mobile only -->
			<a class="nav-toggler waves-effect waves-light d-block d-md-none" href="javascript:void(0)"><i class="ti-menu ti-close"></i></a>
			<a class="navbar-brand" href="{{ route('home') }}">
				<!-- Logo icon -->
				<b class="logo-icon">
					<!--You can put here icon as well // <i class="wi wi-sunset"></i> //-->
					<!-- Dark Logo icon -->
					<!-- <img src="{{asset('assets/images/logos/logo-icon.png')}}" alt="homepage" class="dark-logo" /> -->
                    <a href="javascript:void(0);">
                        <img
                            style="width: 100%; max-width:100px"
                            src="{{ asset('/assets/images/logos/gsr2.png') }}"
                            alt="homepage"
                            class="dark-logo"
                        />
                    </a>
					<!-- Light Logo icon -->
					<!-- <img src="{{ asset('assets/images/logos/logo-light-icon.png')}}" alt="homepage" class="light-logo" /> -->
				</b>
				<!--End Logo icon -->
			</a>
			<!-- ============================================================== -->
			<!-- End Logo -->
			<!-- ============================================================== -->
			<!-- ============================================================== -->
			<!-- Toggle which is visible on mobile only -->
			<!-- ============================================================== -->
			<a
				class="topbartoggler d-block d-md-none waves-effect waves-light"
				href="javascript:void(0)"
				data-bs-toggle="collapse"
				data-bs-target="#navbarSupportedContent"
				aria-controls="navbarSupportedContent"
				aria-expanded="false"
				aria-label="Toggle navigation"
			>
				<i class="ti-more"></i>
			</a>
		</div>
		<!-- ============================================================== -->
		<!-- End Logo -->
		<!-- ============================================================== -->
		<div class="navbar-collapse collapse" id="navbarSupportedContent">
			<!-- ============================================================== -->
			<!-- toggle and nav items -->
			<!-- ============================================================== -->
			<ul class="navbar-nav me-auto">
				<li class="nav-item d-none d-md-block"><a class="nav-link sidebartoggler waves-effect waves-light" href="javascript:void(0)" data-sidebartype="mini-sidebar"><i class="mdi mdi-menu fs-5"></i></a></li>
			</ul>
			<!-- ============================================================== -->
			<!-- Right side toggle and nav items -->
			<!-- ============================================================== -->
			<ul class="navbar-nav">
				<!-- ============================================================== -->
				<!-- Search -->
				<!-- ============================================================== -->
				<li class="nav-item search-box">
					<form class="app-search d-none d-lg-block">
						<input type="text" class="form-control" placeholder="Search...">
						<a href="" class="active"><i class="fa fa-search"></i></a>
					</form>
				</li>
				<!-- ============================================================== -->
				<!-- User profile and search -->
				<!-- ============================================================== -->
				<li class="nav-item dropdown">
					<a class="nav-link dropdown-toggle waves-effect waves-dark" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
						<img
                            src="{{ getImgPath('PROFIL', session('cheminPhoto'), session('type_user'))}}"
                            alt="user"
                            class="rounded-circle"
                            width="40"
                            onerror="this.onerror=null;this.src='{{ asset('/assets/images/avatar.png') }}';"
                        >
						<span class="ms-2 font-weight-medium">{{session('username')}}</span>
                        <span class="fas fa-angle-down ms-2"></span>
					</a>

					<div class="dropdown-menu dropdown-menu-end user-dd animated flipInY">
						<div class="d-flex no-block align-items-center p-3 bg-theme-light mb-2">
							<div class="">
                                <img
                                    src="{{ getImgPath('PROFIL', session('cheminPhoto'), session('type_user'))}}"
                                    alt="user"
                                    class="rounded-circle"
                                    width="60"
                                    onerror="this.onerror=null;this.src='{{ asset('/assets/images/avatar.png') }}';"
                                >
                            </div>
							<div class="ms-2">
								<h4 class="mb-0 text-white">{{session('username')}}</h4>
								<p class=" mb-0">{{session('email')}}</p>
							</div>
						</div>
						<a class="dropdown-item" href="{{route('profile')}}">
                            <i data-feather="user" class="feather-sm text-info me-1 ms-1"></i> Voir profil
                        </a>
						<a class="dropdown-item" href="{{route('profile')}}#messages" onclick="showProfile(this)">
                            <i data-feather="credit-card" class="feather-sm text-info me-1 ms-1"></i>Activités
                        </a>
						<a class="dropdown-item" href="{{route('profile')}}#info" onclick="showProfile(this)">
                            <i data-feather="mail" class="feather-sm text-success me-1 ms-1"></i> Informations du compte
                        </a>
						<div class="dropdown-divider"></div>
						<a class="dropdown-item" href="{{route('profile')}}#settings" onclick="showProfile(this)">
                            <i data-feather="settings" class="feather-sm text-warning me-1 ms-1"></i>Paramètres du compte
                        </a>
						<div class="dropdown-divider"></div>
						<a class="dropdown-item" href="{{route('logout')}}">
                            <i data-feather="log-out" class="feather-sm text-danger me-1 ms-1"></i> Logout
                        </a>
						<div class="dropdown-divider"></div>
						<div class="ps-4 p-2 d-none"><a href="{{route('profile')}}" class="btn d-block w-100 btn-theme rounded-pill">Voir Profil</a></div>
					</div>
				</li>
				<!-- ============================================================== -->
				<!-- User profile and search -->
				<!-- ============================================================== -->
			</ul>
		</div>
	</nav>
</header>
<!-- ============================================================== -->
<!-- End Topbar header -->
<!-- ============================================================== -->
