{{#if this.shouldDisplay}}
  <Sidebar::Section
    @sectionName="tags"
    @headerLinkText={{i18n "sidebar.sections.tags.header_link_text"}}
    @headerActions={{array
      (hash
        action=this.editTracked
        title=(i18n "sidebar.sections.tags.header_action_title")
      )
    }}
    @headerActionsIcon="pencil-alt"
    @collapsable={{@collapsable}}
  >

    {{#if (gt this.sectionLinks.length 0)}}
      {{#each this.sectionLinks as |sectionLink|}}
        <Sidebar::SectionLink
          @linkName={{sectionLink.name}}
          @route={{sectionLink.route}}
          @title={{sectionLink.title}}
          @content={{sectionLink.text}}
          @currentWhen={{sectionLink.currentWhen}}
          @prefixType={{sectionLink.prefixType}}
          @prefixValue={{sectionLink.prefixValue}}
          @badgeText={{sectionLink.badgeText}}
          @models={{sectionLink.models}}
          @suffixCSSClass={{sectionLink.suffixCSSClass}}
          @suffixValue={{sectionLink.suffixValue}}
          @suffixType={{sectionLink.suffixType}}
        />
      {{/each}}
    {{else}}
      <Sidebar::SectionLink
        @linkName="configure-tags"
        @route="preferences.sidebar"
        @prefixType="icon"
        @prefixValue="pencil-alt"
        @model={{this.currentUser}}
        @content={{i18n "sidebar.sections.tags.links.add_tags.content"}}
        @title={{i18n "sidebar.sections.tags.links.add_tags.title"}}
      />
    {{/if}}

    <Sidebar::Common::AllTagsSectionLink />

    {{#if (and this.currentUser.admin (not this.hasDefaultSidebarTags))}}
      <Sidebar::SectionLink
        @linkName="configure-default-sidebar-tags"
        @content={{i18n "sidebar.sections.tags.configure_defaults"}}
        @prefixType="icon"
        @prefixValue="wrench"
        @route="adminSiteSettingsCategory"
        @model="sidebar"
        @query={{hash filter="default_sidebar_tags"}}
      />
    {{/if}}
  </Sidebar::Section>
{{/if}}