$newline never

$# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later

<section>
  ^{formWidget}
$maybe (courses, intersections, mapIntersect, allUsersUnion, allUsersIntersection) <- intersectionsRes
  <section>
    <div .scrolltable .scrolltable--bordered>
      <table .table .table--hover .table--condensed>
        <thead>
          <tr .table__row--head>
            <th .table__th>
            $forall Entity _ Course{courseTerm, courseSchool, courseShorthand} <- courses
              <th .table__th .text--center>
                #{courseTerm}-#{courseSchool}-#{courseShorthand}
            <th .table__th .text--center>
              _{MsgParticipantsIntersectNotOne}
        <tbody>
          $forall (l, Entity lCid Course{courseTerm, courseSchool, courseShorthand}) <- lIxed courses
            <tr .table__row>
              <th .table__th .text--right>
                #{courseTerm}-#{courseSchool}-#{courseShorthand}
              $forall (u, Entity uCid _) <- lIxed courses
                $if l > u
                  <td .table__td>
                $else
                  $with n <- symmIntersection intersections lCid uCid
                    <td .table__td .text--center :uCid == lCid:.table__td--automatic :uCid /= lCid:.heated :uCid /= lCid:style="--hotness: #{toPathPiece (intersectionHotness intersections lCid uCid)}">
                      $if showNumber n lCid uCid
                        #{n}
              $maybe num <- Map.lookup lCid mapIntersect
                <td .table__td .text--center .table__td--automatic>
                  #{num}
  <p> 
    _{MsgAllUsersUnion}: #
    #{allUsersUnion}
  <p> 
    _{MsgAllUsersIntersection}: #
    #{allUsersIntersection}