<aside class="main-sidebar sidebar-dark-primary elevation-4 sidebar-no-expand">

	<a href="#" class="brand-link text-center">
		<span class="brand-text font-weight-light">
			<img src="<?= base_url() ?>/images/logo.jpg" alt="Logistique" class="text-center" width="100px" height="100px" style="opacity: .8">
		</span>
	</a>
	<div class="sidebar" style="overflow-y: auto;">

		<nav class="mt-2">
			<ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy nav-compact nav-child-indent nav-collapse-hide-child text-sm" data-widget="treeview" role="menu" data-accordion="false">
				<?php if (\auth()->user()->inGroup('user', 'secretaire', 'admin') || \auth()->user()->hasPermission('admin.access')) { ?>
					<li class="nav-item">
						<?= anchor($locale . "/achat", "<i class='bi bi-folder nav-icon'></i> Achats <i class='fas fa-angle-right right'></i>", ['class' => 'nav-link']) ?>
					</li>
				<?php } ?>

				<?php if (\auth()->user()->inGroup('user', 'secretaire', 'admin') || \auth()->user()->hasPermission('admin.access')) { ?>

					<li class="nav-item">
						<?= anchor("#", "<i class='bi bi-list nav-icon'></i> Inventaire <i class='fas fa-angle-left right'></i>", ['class' => 'nav-link']) ?>

						<ul class="nav nav-treeview" style="display: none;">

							<li class="nav-item">
								<?= anchor($locale . "/inv/equipement", "<i class='far fa-circle nav-icon'></i> Equipements", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/inv/mobilier", "<i class='far fa-circle nav-icon'></i> Mobiliers", ['class' => 'nav-link']) ?>
							</li>

						</ul>
					</li>

				<?php } ?>

				<?php if (\auth()->user()->inGroup('user', 'secretaire', 'admin') || \auth()->user()->hasPermission('admin.access')) { ?>

					<li class="nav-item">
						<?= anchor("#", "<i class='bi bi-folder nav-icon'></i> Paramètres <i class='fas fa-angle-left right'></i>", ['class' => 'nav-link']) ?>

						<ul class="nav nav-treeview" style="display: none;">

							<li class="nav-item">
								<?= anchor($locale . "/params/branche", "<i class='far fa-circle nav-icon'></i> Branches", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/params/province", "<i class='far fa-circle nav-icon'></i> Provinces", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/params/unite", "<i class='far fa-circle nav-icon'></i> Unités", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/params/statut_achat", "<i class='far fa-circle nav-icon'></i> Statuts des achats", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/params/statut_mobilier", "<i class='far fa-circle nav-icon'></i> Statuts des mobiliers", ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/params/etat_equipement", "<i class='far fa-circle nav-icon'></i> Etats des équipements", ['class' => 'nav-link']) ?>
							</li>

						</ul>
					</li>

				<?php } ?>
				<?php if (\auth()->user()->inGroup('secretaire', 'admin')) { ?>

					<li class="nav-item">
						<?= anchor("#", "<i class='bi bi-gear nav-icon'></i>" . lang("Menu.menu_admin") . "<i class='fas fa-angle-left right'></i>", ['class' => 'nav-link']) ?>
						<ul class="nav nav-treeview" style="display: none;">

							<li class="nav-item">
								<?= anchor($locale . "/admin/groupes", "<i class='far fa-circle nav-icon'></i> " . lang("Menu.menu_admin_1"), ['class' => 'nav-link']) ?>
							</li>

							<li class="nav-item">
								<?= anchor($locale . "/admin/users", "<i class='far fa-circle nav-icon'></i> " . lang("Menu.menu_admin_3"), ['class' => 'nav-link']) ?>
							</li>
						</ul>
					</li>
				<?php } ?>
			</ul>
		</nav>

	</div>

</aside>