<Course::BackToCourses />

<section
  class="course-details"
  data-test-ilios-course-details
  {{did-insert (set this.topSection)}}
  {{animate-loading "course" loadingTime=500}}
  ...attributes
>
  <CourseHeader @course={{@course}} @editable={{and @editable this.notRolloverRoute}} />
  <CourseOverview @course={{@course}} @editable={{and @editable this.notRolloverRoute}} />
  {{#unless @showDetails}}
    <div class="detail-collapsed-control">
      <button
        type="button"
        data-test-expand-course-details
        {{on "click" (fn @setShowDetails true)}}
      >
        {{t "general.expandDetail"}}
        <FaIcon @icon="square-plus" class="expand-collapse-icon" />
      </button>
    </div>
  {{else}}
    <CourseEditing
      @course={{@course}}
      @editable={{and @editable this.notRolloverRoute}}
      @courseLeadershipDetails={{@courseLeadershipDetails}}
      @courseObjectiveDetails={{@courseObjectiveDetails}}
      @courseTaxonomyDetails={{@courseTaxonomyDetails}}
      @courseCompetencyDetails={{@courseCompetencyDetails}}
      @courseManageLeadership={{@courseManageLeadership}}
      @setCourseObjectiveDetails={{@setCourseObjectiveDetails}}
      @setCourseLeadershipDetails={{@setCourseLeadershipDetails}}
      @setCourseTaxonomyDetails={{@setCourseTaxonomyDetails}}
      @setCourseCompetencyDetails={{@setCourseCompetencyDetails}}
      @setCourseManageLeadership={{@setCourseManageLeadership}}
    />
    <div class="detail-collapsed-control">
      <button
        type="button"
        data-test-expand-course-details
        {{on "click" this.collapse}}
      >
        {{t "general.collapseDetail"}}
        <FaIcon @icon="square-minus" class="expand-collapse-icon" />
      </button>
    </div>
  {{/unless}}
</section>
