<div
  class="detail-learnergroups-list"
  data-test-detail-learnergroups-list
>
  {{#if (is-array this.trees)}}
    {{#each this.trees as |tree|}}
      <div class="trees" data-test-trees>
        <fieldset data-test-tree>
          <legend>
            {{tree.cohort.programYear.program.title}} {{tree.cohort.title}}
          </legend>
          <ul class="selected-groups" data-test-selected-groups>
            {{#each tree.groups as |group|}}
              <DetailLearnergroupsListItem
                @group={{group}}
                @remove={{@remove}}
                @isManaging={{@isManaging}}
              />
            {{/each}}
          </ul>
        </fieldset>
      </div>
    {{/each}}
  {{else}}
    <LoadingSpinner />
  {{/if}}
</div>
