<div id="NavSideBar">

<ul class="nav top-level-nav flex-column accordion" id="ShieldCollapseNav">

	{% for mitem in vars.navbar_menu %}
		{% set is_expandable = mitem.sub_items|default([]) is not empty %}

		<li class="nav-item {{ mitem.active|default(false) ? 'active':'' }}
					{% if is_expandable %} with-submenu{% endif %}"
			{% if mitem.id|default('') is not empty %}id="{{ mitem.id }}"{% endif %}
		>
				<span class="nav-link {{ mitem.classes|default([])|join( ' ' ) }} {{ mitem.active|default(false) ? 'show':'' }}
						d-flex justify-content-start"
						{% for data_key,data_val in mitem.data|default([]) %}
							data-{{ data_key }}="{{ data_val }}"
						{% endfor %}
						{% if mitem.introjs|default([]) is not empty %}
							{% if mitem.introjs.title|default('') is not empty %}
								data-introtitle="{{ mitem.introjs.title }}"
							{% endif %}
							data-intro="{{ mitem.introjs.body }}"
							data-introposition="right"
						{% endif %}
				>
					<a href="{{ is_expandable ? '#subnav-' ~ mitem.slug : mitem.href|default('javascript:{}') }}"
					   class="d-flex justify-content-start"
					   {% if is_expandable %}
						   data-bs-toggle="collapse"
						   data-bs-target="#subnav-{{ mitem.slug }}"
						   aria-controls="subnav-{{ mitem.slug }}"
						   aria-expanded="{{ mitem.active|default(false) ? 'true' : 'false' }}"
					   {% endif %}
					   {% if mitem.target|default('') is not empty %}target="{{ mitem.target }}"{% endif %}
					>

						{% if mitem.img|default('') is not empty %}
							<span class="nav-icon me-2 d-flex flex-column justify-content-center"
								  style="vertical-align: text-bottom;"
								  title="{{ mitem.title }}">
								{{ mitem.img|raw }}
							</span>
						{% endif %}

						<span class="top-title d-flex flex-column">
							<span class="title">
								{{ mitem.title }}
								{% if mitem.sub_items|default([]) is not empty %}
									{{ imgs.svgs.triangle|raw }}
								{% endif %}
							</span>
							<span class="subtitle">
								{{ mitem.subtitle|default('') }}
							</span>
						</span>

						{% if mitem.badge|default([]) is not empty %}
							<span class="badge bg-{{ mitem.badge.type|default('info') }}">
								{{ mitem.badge.text }}
							</span>
						{% endif %}

					</a>

					{% if mitem.config|default([]) is not empty %}
						<a class="flex-fill d-flex flex-row justify-content-end align-self-center me-1 z-3 {{ mitem.config.classes|default([])|join( ' ' ) }}"
						   href="{{ mitem.config.href|default('#') }}"
						   {% if mitem.config.tooltip|default(false) is not empty %}title="{{ mitem.config.tooltip }}"{% endif %}
								{% for data_key,data_val in mitem.config.data|default([]) %}
									data-{{ data_key }}="{{ data_val }}"
								{% endfor %}
								{% if mitem.config.tooltip|default(false) is not empty %}
									data-bs-toggle="tooltip"
									data-bs-placement="right"
									data-bs-title="{{ mitem.config.tooltip }}"
								{% endif %}
						><span class="svg-container">{{ mitem.config.img|raw }}</span></a>
					{% endif %}
				</span>

			{% if mitem.sub_items|default([]) is not empty %}
				<div class="subnav-menu accordion-collapse {{ mitem.active|default(false) ? 'show':'collapse' }}"
					 id="subnav-{{ mitem.slug }}"
					 data-bs-parent="#ShieldCollapseNav"
				>
					<ul class="nav flex-column primary_side_sub_menu">
						{% for sub_item in mitem.sub_items %}
							<li>

								<span class="nav-link d-flex justify-content-between {{ sub_item.active ? 'active':'' }}">

									<a class="flex-fill {{ sub_item.classes|default([])|join( ' ' ) }}"
									   href="{{ sub_item.href|default('#') }}"
									   {% if sub_item.tooltip|default(false) is not empty %}title="{{ sub_item.tooltip }}"{% endif %}
											{% for data_key,data_val in sub_item.data|default([]) %}
												data-{{ data_key }}="{{ data_val }}"
											{% endfor %}
											{% if sub_item.target|default('') is not empty %}target="{{ sub_item.target }}"{% endif %}
									>
										{{ sub_item.title }}
									</a>

									{% if sub_item.config|default(null) is not empty %}
										<a class="zone_config text-end {{ sub_item.config.classes|default([])|join( ' ' ) }}"
										   href="{{ sub_item.config.href|default('#') }}"
										   {% if sub_item.config.tooltip|default(false) is not empty %}title="{{ sub_item.config.tooltip }}"{% endif %}
												{% for data_key,data_val in sub_item.config.data|default([]) %}
													data-{{ data_key }}="{{ data_val }}"
												{% endfor %}
												{% if sub_item.config.tooltip|default(false) is not empty %}
													data-bs-toggle="tooltip"
													data-bs-placement="right"
													data-bs-title="{{ sub_item.config.tooltip }}"
												{% endif %}
										><span class="svg-container">{{ sub_item.config.icon|raw }}</span></a>
									{% endif %}

								</span>

							</li>
						{% endfor %}
					</ul>
				</div>
			{% endif %}
		</li>

	{% endfor %}
</ul>
</div>

{% if not flags.is_whitelabelled %}
	<div class="mt-2 text-center border-bottom mx-auto" style="color: #008000;">
		{{ strings.running_version|raw }}
	</div>
{% endif %}
