{% if theme_navbar_start or theme_navbar_center or theme_navbar_end or theme_navbar_persistent %}
<div class="bd-header__inner bd-page-width">
  <button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="{{ _('Site navigation') }}">
    <span class="fa-solid fa-bars"></span>
  </button>
  {% set navbar_start, navbar_class, navbar_align = navbar_align_class() %}
  {% if theme_navbar_start %}
  <div class="{{ navbar_start }} navbar-header-items__start">
    {% for navbar_item in theme_navbar_start %}
      <div class="navbar-item">{% include navbar_item %}</div>
    {% endfor %}
  </div>
  {% endif %}
  <div class="{{ navbar_class }} navbar-header-items">
    {% if theme_navbar_center %}
    <div class="{{ navbar_align }} navbar-header-items__center">
      {% for navbar_item in theme_navbar_center %}
        <div class="navbar-item">{% include navbar_item %}</div>
      {% endfor %}
    </div>
    {% endif %}
    {% if theme_navbar_end or theme_navbar_persistent %}
    <div class="navbar-header-items__end">
      {% for navbar_item in theme_navbar_persistent %}
        <div class="navbar-item navbar-persistent--container">
          {% include navbar_item %}
        </div>
      {% endfor %}
      {% for navbar_item in theme_navbar_end %}
        <div class="navbar-item">{% include navbar_item %}</div>
      {% endfor %}
    </div>
    {% endif %}
  </div>
  {# A search button to show up only on mobile #}
  {% for navbar_item in theme_navbar_persistent %}
    <div class="navbar-persistent--mobile">
      {%- include navbar_item %}
    </div>
  {% endfor %}

  {% if not remove_sidebar_secondary and secondary_sidebar_items %}
    <button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="{{ _('On this page') }}">
      <span class="fa-solid fa-outdent"></span>
    </button>
  {% endif %}
</div>
{% endif %}
