{% set _app_slugs = {'cart': cart_url('/')} %}
{% set _first_seg = request.path.strip('/').split('/')[0] %}
<div class="flex flex-col sm:flex-row sm:items-center gap-2 border-r border-stone-200 mr-2 sm:max-w-2xl"
     id="menu-items-nav-wrapper">
  {% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
  {% call(item) scrolling_menu('menu-items-container', menu_items) %}
    {% set _href = _app_slugs.get(item.slug, coop_url('/' + item.slug + '/')) %}
    <a
      href="{{ _href }}"
      aria-selected="{{ 'true' if (item.slug == _first_seg or item.slug == app_name) else 'false' }}"
      class="{{styles.nav_button_less_pad}}"
    >
      {% if item.feature_image %}
        <img src="{{ item.feature_image }}"
             alt="{{ item.label }}"
             class="w-8 h-8 rounded-full object-cover flex-shrink-0" />
      {% else %}
        <div class="w-8 h-8 rounded-full bg-stone-200 flex-shrink-0"></div>
      {% endif %}
      <span>{{ item.label }}</span>
    </a>
  {% endcall %}
</div>
