<div
  class="session-leadership-expanded"
  data-test-session-leadership-expanded
  {{did-insert (perform this.load) @session}}
>
  {{#if this.load.isRunning}}
      <LoadingSpinner />
  {{else}}
    <div class="session-leadership-expanded-header">
      {{#if @isManaging}}
        <h3 class="title" data-test-title>
          {{t "general.leadership"}} ({{this.count}})
        </h3>
      {{else}}
        <button
          class="title link-button"
          type="button"
          aria-expanded="true"
          data-test-title
          {{on "click" @collapse}}
        >
          {{t "general.leadership"}} ({{this.count}})
          <FaIcon @icon="caret-down" />
        </button>
      {{/if}}
      <div class="actions">
        {{#if @isManaging}}
          <button class="bigadd" type="button" {{on "click" (perform this.save)}} data-test-save>
            <FaIcon
              @icon={{if this.save.isRunning "spinner" "check"}}
              @spin={{this.save.isRunning}}
            />
          </button>
          <button class="bigcancel" type="button" {{on "click" (perform this.cancel)}} data-test-cancel>
            <FaIcon @icon="arrow-rotate-left" />
          </button>
        {{else if @canUpdate}}
          <button type="button" {{on "click" this.manage}} data-test-manage>
            {{t "general.manageLeadership"}}
          </button>
        {{/if}}
      </div>
    </div>
    <div class="session-leadership-expanded-content">
      {{#if @isManaging}}
        <LeadershipManager
          @showDirectors={{false}}
          @administrators={{this.administrators}}
          @showAdministrators={{true}}
          @removeAdministrator={{this.removeAdministrator}}
          @addAdministrator={{this.addAdministrator}}
          @studentAdvisors={{this.studentAdvisors}}
          @showStudentAdvisors={{true}}
          @removeStudentAdvisor={{this.removeStudentAdvisor}}
          @addStudentAdvisor={{this.addStudentAdvisor}}
        />
      {{else}}
        <LeadershipList
          @administrators={{this.administrators}}
          @studentAdvisors={{this.studentAdvisors}}
          @showAdministrators={{true}}
          @showDirectors={{false}}
          @showStudentAdvisors={{true}}
        />
      {{/if}}
    </div>
  {{/if}}
</div>
