<section class="user-navigation user-navigation-primary">
  <HorizontalOverflowNav
    @className="main-nav nav user-nav"
    @ariaLabel="User primary"
  >
    {{#unless @user.profile_hidden}}
      <DNavigationItem @route="user.summary" @class="user-nav__summary">
        {{d-icon "user"}}
        <span>{{i18n "user.summary.title"}}</span>
      </DNavigationItem>

      <DNavigationItem
        @route="userActivity"
        @class="user-nav__activity"
        @ariaCurrentContext="parentNav"
      >
        {{d-icon "stream"}}
        <span>{{i18n "user.activity_stream"}}</span>
      </DNavigationItem>

    {{/unless}}

    {{#if @showNotificationsTab}}
      <DNavigationItem
        @route="userNotifications"
        @class="user-nav__notifications"
        @ariaCurrentContext="parentNav"
      >
        {{d-icon "bell" class="glyph"}}
        <span>{{i18n "user.notifications"}}</span>
      </DNavigationItem>
    {{/if}}

    {{#if @showPrivateMessages}}
      <DNavigationItem
        @route="userPrivateMessages"
        @class="user-nav__personal-messages"
        @ariaCurrentContext="parentNav"
      >
        {{d-icon "envelope"}}
        <span>{{i18n "user.private_messages"}}</span>
      </DNavigationItem>
    {{/if}}

    {{#if @canInviteToForum}}
      <DNavigationItem
        @route="userInvited"
        @class="user-nav__invites"
        @ariaCurrentContext="parentNav"
      >
        {{d-icon "user-plus"}}
        <span>{{i18n "user.invited.title"}}</span>
      </DNavigationItem>
    {{/if}}

    {{#if @showBadges}}
      <DNavigationItem @route="user.badges" @class="user-nav__badges">
        {{d-icon "certificate"}}
        <span>{{i18n "badges.title"}}</span>
      </DNavigationItem>
    {{/if}}

    <PluginOutlet
      @name="user-main-nav"
      @connectorTagName="li"
      @outletArgs={{hash model=@user}}
    />

    {{#if @user.can_edit}}
      <DNavigationItem
        @route="preferences"
        @class="user-nav__preferences"
        @ariaCurrentContext="parentNav"
      >
        {{d-icon "cog"}}
        <span>{{i18n "user.preferences"}}</span>
      </DNavigationItem>
    {{/if}}

    {{#if (and this.site.mobileView this.currentUser.staff)}}
      <li class="user-nav__admin">
        <a href={{@user.adminPath}}>
          {{d-icon "wrench"}}
          <span>{{i18n "admin.user.manage_user"}}</span>
        </a>
      </li>
    {{/if}}
  </HorizontalOverflowNav>
</section>