{#
	The tabs across the top of a mode's page (Investigate, Reports). Each tab is a link to itself, so it can be
	opened in a new window or copied; on the page, the mode's script opens each tab in place.
	Takes: tabs { label, tabs: [ { key, label, icon_class, href, is_current, attributes? } ] }, key_attr, mode.
#}
{# Class names are written out in full so the stylesheet build keeps them. #}
{% set mode_class = { investigate: 'shield-tabs--investigate', reports: 'shield-tabs--reports', configure: 'shield-tabs--configure' }[ mode ] %}
<nav class="shield-tabs {{ mode_class }}" aria-label="{{ tabs.label }}">
	<div class="shield-tabs__list">
		{% for tab in tabs.tabs %}
			<a class="shield-tabs__tab{{ tab.is_current ? ' is-current' : '' }}"
			   href="{{ tab.href }}"
			   {{ key_attr }}="{{ tab.key }}"
			   {% if tab.is_current %}aria-current="page"{% endif %}
			   {% for attr, value in tab.attributes %} {{ attr }}="{{ value|e('html_attr') }}"{% endfor %}>
				{% if tab.key == 'live' %}
					<span class="shield-tabs__live-dot" aria-hidden="true"></span>
				{% else %}
					<i class="{{ tab.icon_class }}" aria-hidden="true"></i>
				{% endif %}
				{{ tab.label }}
			</a>
		{% endfor %}
	</div>
</nav>
