{{#if this.activeSectionLink}}
  <Sidebar::MoreSectionLink @sectionLink={{this.activeSectionLink}} />
{{/if}}

<details
  class="sidebar-more-section-links-details"
  {{on "toggle" this.toggleSectionLinks}}
>
  <summary class="sidebar-more-section-links-details-summary sidebar-row">
    <span class="sidebar-more-section-links-icon-wrapper">
      {{d-icon "ellipsis-v"}}
    </span>

    {{i18n "sidebar.more"}}
  </summary>

  {{#if this.shouldDisplaySectionLinks}}
    <div
      class="sidebar-more-section-links-details-content-wrapper"
      {{did-insert this.registerClickListener}}
      {{will-destroy this.unregisterClickListener}}
    >

      <div class="sidebar-more-section-links-details-content">
        <div class="sidebar-more-section-links-details-content-main">
          {{#each this.sectionLinks as |sectionLink|}}
            <Sidebar::MoreSectionLink @sectionLink={{sectionLink}} />
          {{/each}}
        </div>

        {{#if (gt this.secondarySectionLinks.length 0)}}
          <div class="sidebar-more-section-links-details-content-secondary">
            {{#each this.secondarySectionLinks as |sectionLink|}}
              <Sidebar::MoreSectionLink @sectionLink={{sectionLink}} />
            {{/each}}
          </div>
        {{/if}}
      </div>
    </div>
  {{/if}}
</details>