<!doctype html>
<html lang="fr">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>
			{% block title %}Share -
			{% endblock %}
		</title>
		{% block stylesheets %}
            {{ encore_entry_link_tags('app') }}
			<link href="https://bootswatch.com/5/vapor/bootstrap.min.css" rel="stylesheet">
			<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
		{% endblock %}
	</head>
	<body>
		<nav class="navbar navbar-expand-lg bg-light" data-bs-theme="light">
			<div class="container-fluid">
				<a class="navbar-brand" href="{{path('app_accueil')}}">Share</a>
				<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor03" aria-controls="navbarColor03" aria-expanded="false" aria-label="Toggle navigation">
					<span class="navbar-toggler-icon"></span>
				</button>
				<div class="collapse navbar-collapse" id="navbarColor03">
					<ul class="navbar-nav me-auto">
						<li class="nav-item">
							<a class="nav-link active" href="{{path('app_accueil')}}">Accueil
								<span class="visually-hidden">(current)</span>
							</a>
						</li>
						<li class="nav-item dropdown">
							<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Catégorie</a>
							<div class="dropdown-menu">
								<a class="dropdown-item" href="{{path('app_categorie')}}">Ajout de categorie</a>
								<a class="dropdown-item" href="{{path('app_liste_categories')}}">Liste des categories</a>
								<a class="dropdown-item" href="{{path('app_ajout_scategorie')}}">Ajout de sous categorie</a>
							</div>
						</li>

						<li class="nav-item">
							<a class="nav-link" href="{{path('app_contact')}}">Contact</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="{{path('app_apropos')}}">À Propos</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="{{path('app_mentionslegales')}}">Mentions Legales</a>
						</li>
					</ul>

					<form class="d-flex">
						<input class="form-control me-sm-2" type="search" placeholder="Search">
						<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
					</form>

					<ul class="navbar-nav me-auto">
						{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
							<li class="nav-item">
								<a class="nav-link" href="{{path('app_login')}}">Se connecter
								</a>
							</li>
							<li class="nav-item">
								<a class="nav-link" href="{{path('app_register')}}">S'inscrire
								</a>
							</li>
						{% else %}
							{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MOD')%}
								<li class="nav-item">
									<a class="nav-link text-white" href="{{path('app_liste_contacts')}}">Liste des contacts</a>
								</li>
								{% if is_granted('ROLE_ADMIN') %}
									<li class="nav-item dropdown">
										<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Adminstration</a>
										<div class="dropdown-menu">
											<a class="dropdown-item" href="{{path('app_liste_utilisateurs')}}">Liste utilisateurs</a>
											<a class="dropdown-item" href="{{path('app_liste_contacts')}}">Liste des contacts</a>
											<a class="dropdown-item" href="{{path('app_liste_fichiers')}}">Liste des fichiers</a>
											<a class="dropdown-item" href="{{path('app_liste_fichiers_par_utilisateur')}}">Liste des fichiers par utilisateurs</a>
											<a class="dropdown-item" href="{{path('app_ajout_fichier')}}">Ajout de fichier</a>
											<div class="dropdown-divider"></div>
											<a class="dropdown-item" href="#">Separated link</a>
										</div>
									</li>
								{% endif %}
							{% endif %}
							<li class="nav-item">
								<a class="nav-link" href="{{path('app_profil')}}">
									<i class="bi bi-person-circle"></i>
								</a>
							</li>

							<li class="nav-item">
								<a class="nav-link" href="{{path('app_logout')}}">
									{{app.user.prenom}}
									<i class="bi bi-x-circle-fill"></i>
								</a>
							</li>
						{% endif %}
					</ul>
				</div>
			</div>
		</nav>
		{% for message in app.flashes('notice') %}
			<h2 class="alert alert-warning text-center mt-4 mb-4" role="alert">
				{{ message }}
			</h2>
		{% endfor %}
		{% block body %}Share
		{% endblock %}
		{% block javascripts %}
            {{ encore_entry_script_tags('app') }}
			<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
		{% endblock %}
	</body>
</html></body></html></body></html>
