$newline never

$# SPDX-FileCopyrightText: 2022-25 Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>,Steffen Jost <s.jost@fraport.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later

<section>
  <dl .deflist>
    $maybe descr <- qualificationDescription quali
      <dt .deflist__dt>_{MsgQualificationDescription}
      <dd .deflist__dd>
        <div>
          #{descr}
    $maybe dvalid <- qualificationValidDuration quali
      <dt .deflist__dt>_{MsgQualificationValidDuration}
      <dd .deflist__dd>_{MsgMonths (fromIntegral dvalid)}

    <dt .deflist__dt>_{MsgQualificationAuditDuration}
    <dd .deflist__dd>
      $maybe lqre <- lmsQualiReused
        _{MsgDays (fromIntegral (qualificationAuditDuration lqre))}
      $nothing
        _{MsgDays (fromIntegral (qualificationAuditDuration quali))}

    $maybe drefresh <- qualificationRefreshWithin quali
      <dt .deflist__dt>_{MsgQualificationRefreshWithin} ^{iconTooltip (msg2widget MsgQualificationRefreshWithinTooltip) Nothing True}
      <dd .deflist__dd>
        $with drm <- cdMonths drefresh
          $with drd <- cdDays drefresh
            $if drm > 0
              _{MsgMonths (fromIntegral drm)}
              $if drd > 0
                , #
            $if drd > 0
              _{MsgDays   (fromIntegral drd)}

    $maybe dremind <- qualificationRefreshReminder quali
      <dt .deflist__dt>_{MsgQualificationRefreshReminder} ^{iconTooltip (msg2widget MsgQualificationRefreshReminderTooltip) Nothing True}
      <dd .deflist__dd>
        $with drm <- cdMonths dremind
          $with drd <- cdDays dremind
            $if drm > 0
              _{MsgMonths (fromIntegral drm)}
              $if drd > 0
                , #
            $if drd > 0
              _{MsgDays   (fromIntegral drd)}
    
    <dt .deflist__dt>_{MsgQualificationElearningStart}
    <dd .deflist__dd>#{boolSymbol (qualificationElearningStart quali)}
      $if (qualificationElearningStart quali) && isNothing (qualificationRefreshWithin quali)
        <p>
          #{icon IconNotificationError}
          _{MsgLmsErrorNoRefreshElearning}

    <dt .deflist__dt>_{MsgQualificationElearningRenew}
    <dd .deflist__dd>#{boolSymbol (qualificationElearningRenews quali)}
      $if (qualificationElearningRenews quali) && isNothing (qualificationValidDuration quali)
        <p>
          #{icon IconNotificationError}
          _{MsgLmsErrorNoRenewElearning}

    <dt .deflist__dt>_{MsgQualificationElearningLimit}
    <dd .deflist__dd>
      $maybe n <- qualificationElearningLimit quali
        _{MsgQualificationElearningLimitMax n}
      $nothing 
        _{MsgQualificationElearningNoLimit}

<section>
  ^{qualificationTable}

