$newline never

$# SPDX-FileCopyrightText: 2022 Steffen Jost <jost@tcs.ifi.lmu.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later

<section>
  <h2>
    Person data of all AVS drivers

  $if numUnknownLicenceOwners > 0
    <p>
      ^{modal (text2widget (tshow numUnknownLicenceOwners <> " Person IDs")) (Right (text2widget ("AVS Person IDs: " <> tshow unknownLicenceOwners)))} #      
      owning a driving licence within AVS were found, which are unknown within the FRADrive database. #

      There are two solutions to this problem: #
    <p>
      ^{btnImportUnknownWgt}
      ^{revokeUnknownSafetyWgt}

  $else
    <p>
      All AVS driving licence owners are also registered with FRADrive as expected.

<section>
  <h2>
    Nonconforming driving licence
  <p>
    The following sections show all discrepancies
    between AVS and FRADrive with respect to driving licences. #
    It is recommended to adjust AVS driving licences and keep FRADrive as it is.

  <h3>
    Maneuvering area driving licence 'R' valid in FRADrive, but not in AVS
  <p>
    ^{tb2}
  <h3>
    Maneuvering area driving licence 'R' invalid in FRADrive, but valid in AVS and having a valid 'F' in FRADrive
  <p>
    ^{tb1down}
  <h3>
    Apron driving licence 'F' valid in FRADrive, but not in AVS
  <p>
    ^{tb1up}
  <h3>
    No valid driving licence in FRADrive, but having any driving licence in AVS (maneuvering or apron)
  <p>
    ^{tb0}

$if notNull avsLicenceSynchTimes
  <section>
    <h2>
      Automatic AVS licence sychronisation
    <p>
      <dl .deflist>
        <dt .deflist__dt>
          Synchronisation times
        <dd .deflist__dd>
          Synchronize on weekdays, few minutes after each full hour: #{tshow avsLicenceSynchTimes}
        <dt .deflist__dt>
          Synchronisation level
        <dd .deflist__dd>
          <strong>#{avsLicenceSynchLevel}: #
          $case avsLicenceSynchLevel
            $of 1
              Revoke apron driving licences only
            $of 2 
              Grant and revoke apron driving licences only
            $of 3
              Grant and revoke apron driving licences and downgrade maneuvering area licences to apron driving licences
            $of _
              Grant and revoke all driving licences automatically
        $maybe reasons <- avsLicenceSynchReasonFilter
          <dt .deflist__dt>
            Exemptions
          <dd .deflist__dd>
            Do not synchronize changes where the last un-/block reason matches #{reasons}
        $maybe maxChange <- avsLicenceSynchMaxChanges
          <dt .deflist__dt>
            Max changes
          <dd .deflist__dd>
            Do not synchronize a licence level if the number of changes exceeds #{maxChange}
