$newline never

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

<div ##{theId} *{attrs} .explained-selection-field>
  $maybe (msg, wgt) <- optMsg
    <div .explained-selection-field__option>
      <label .explained-selection-field__input .explained-selection-field__input--none for=#{inputId "none"}>
        <input ##{inputId "none"} type=radio name=#{name} value="" :matchesVal Nothing:checked>
      <label .explained-selection-field__label .explained-selection-field__label--none for=#{inputId "none"}>
        _{msg}
      $maybe w <- wgt
        <div .explained-selection-field__explanation .explained-selection-field__explanation--none>
          ^{w}
  $forall (Option{..}, optionExplanation) <- opts
    <div .explained-selection-field__option>
      <label .explained-selection-field__input for=#{inputId optionExternalValue}>
        <input ##{inputId optionExternalValue} type=radio name=#{name} value=#{optionExternalValue} :matchesVal (Just optionInternalValue):checked>
      <label .explained-selection-field__label for=#{inputId optionExternalValue}>
        #{optionDisplay}
      $maybe w <- optionExplanation
        <div .explained-selection-field__explanation>
          ^{w}

