<nav class="navbar has-shadow mb-4" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{{ base_path }}/">
{{ navbar_title }}
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbar" class="navbar-menu">
<div class="navbar-start">
{% if enable_auth and user_is_logged_in or not enable_auth %}
{% for category, entities in entity_names %}
{% if category == "" %}
{% for menu_element in entities %}
{% if menu_element.is_custom_handler %}
<a href="{{ base_path }}/{{ menu_element.link }}" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name }}</a>
{% else %}
<a href="{{ base_path }}/{{ menu_element.link }}/list" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name | split(pat="_") | join(sep=" ") | title }}</a>
{% endif %}
{%- endfor %}
{% elif category != "navbar-end" %}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link {% if entity_name and entity_name in entities %}is-active{% endif %}">
{{ category }}
</a>
<div class="navbar-dropdown">
{% for menu_element in entities %}
{% if menu_element.is_custom_handler %}
<a href="{{ base_path }}/{{ menu_element.link }}" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name }}</a>
{% else %}
<a href="{{ base_path }}/{{ menu_element.link }}/list" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name | split(pat="_") | join(sep=" ") | title }}</a>
{% endif %}
{%- endfor %}
</div>
</div>
{% endif %}
{%- endfor %}
{% endif %}
</div>
<div class="navbar-end">
{%if support_path %}
<a id="support_nav" href="#" class="navbar-item" onclick="toggle_hidden('support')"><i class="fa-solid fa-question"></i></a>
{% endif %}
{% if enable_auth %}
{% if user_is_logged_in %}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
<span class="icon">
<i class="fas fa-user"></i>
</span>
</a>
<div class="navbar-dropdown is-right">
{% for category, entities in entity_names %}
{% if category == "navbar-end" %}
{% for menu_element in entities %}
{% if menu_element.is_custom_handler %}
<a href="{{ base_path }}/{{ menu_element.link }}" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name }}</a>
{% else %}
<a href="{{ base_path }}/{{ menu_element.link }}/list" hx-boost="true" hx-indicator="#loading"
class="navbar-item {% if entity_name and entity_name == menu_element.name %}is-active{% endif %}">{{
menu_element.name | split(pat="_") | join(sep=" ") | title }}</a>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
<hr class="dropdown-divider">
<a href="{{ logout_link }}" class="navbar-item is-right">
Sign Out
</a>
</div>
</div>
{% else %}
<div class="navbar-item">
<div hx-disable class="buttons">
<a href="{{ login_link }}" class="button is-primary">
Sign In
</a>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</nav>