{% import 'macros/links.html' as links %}
{% macro header_row(oob=False) %}
  {% call links.menu_row(id='social-row', oob=oob) %}
    <div class="w-full flex flex-row items-center gap-2 flex-wrap">
      {% if actor %}
        <nav class="flex gap-3 text-sm items-center flex-wrap">
          <a href="{{ url_for('social.defpage_home_timeline') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_home_timeline') %}font-bold{% endif %}">
            Timeline
          </a>
          <a href="{{ url_for('social.defpage_public_timeline') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_public_timeline') %}font-bold{% endif %}">
            Public
          </a>
          <a href="{{ url_for('social.defpage_compose_form') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_compose_form') %}font-bold{% endif %}">
            Compose
          </a>
          <a href="{{ url_for('social.defpage_following_list') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_following_list') %}font-bold{% endif %}">
            Following
          </a>
          <a href="{{ url_for('social.defpage_followers_list') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_followers_list') %}font-bold{% endif %}">
            Followers
          </a>
          <a href="{{ url_for('social.defpage_search') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 {% if request.path == url_for('social.defpage_search') %}font-bold{% endif %}">
            Search
          </a>
          <a href="{{ url_for('social.defpage_notifications') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 relative {% if request.path == url_for('social.defpage_notifications') %}font-bold{% endif %}">
            Notifications
            <span sx-get="{{ url_for('social.notification_count') }}" sx-trigger="load, every 30s" sx-swap="innerHTML"
                  class="absolute -top-2 -right-3 text-xs bg-red-500 text-white rounded-full px-1 empty:hidden"></span>
          </a>
          <a href="{{ url_for('activitypub.actor_profile', username=actor.preferred_username) }}"
             class="px-2 py-1 rounded hover:bg-stone-200">
            @{{ actor.preferred_username }}
          </a>
        </nav>
      {% else %}
        <nav class="flex gap-3 text-sm items-center">
          <a href="{{ url_for('identity.choose_username_form') }}"
             class="px-2 py-1 rounded hover:bg-stone-200 font-bold">
            Choose username
          </a>
        </nav>
      {% endif %}
    </div>
  {% endcall %}
{% endmacro %}
