<section
  class="collapsed-competencies"
  data-test-collapsed-competencies
>
  <div>
    <button
      class="title link-button"
      type="button"
      aria-expanded="false"
      data-test-title
      {{on "click" @expand}}
    >
      {{t "general.competencies"}} ({{@subject.competencies.length}})
      <FaIcon @icon="caret-right" />
    </button>
  </div>
  {{#if this.isLoading}}
    <LoadingSpinner />
  {{else}}
    <div class="content">
      <table>
        <thead>
          <tr>
            <th class="text-left">
              {{t "general.school"}}
            </th>
            <th class="text-center">
              {{t "general.competencies"}}
            </th>
          </tr>
        </thead>
        <tbody>
          {{#each this.summary as |item|}}
            <tr>
              <td>
                {{item.school.title}}
              </td>
              <td class="text-center">
                {{item.competencies.length}}
              </td>
            </tr>
          {{/each}}
        </tbody>
      </table>
    </div>
  {{/if}}
</section>
