$newline never

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

<div .navbar-container>
  <nav .navbar>
    <div .navbar__stack>
      <div .navbar__list-wrapper>
        <ul .navbar__list.navbar__list-left>

          <a .navbar__list-item.navbar__logo href="/">
            <div .navbar__logo-lmu >
              #{logo}

          $# manually add favorites to navbar for small screens
          <li .navbar__list-item.navbar__list-item--favorite>
            <a .navbar__link-wrapper href="#">
              <div .navbar__link-icon>
                <i .fas .fa-2x .fa-#{iconText IconFavourite}>
              <div .navbar__link-label>_{MsgNavigationFavourites}

          $forall n <- filter isNavHeaderPrimary nav
            $case view _1 n
              $of NavHeader{ navLink }
                <li .navbar__list-item :highlightNav navLink:.navbar__list-item--active>
                  ^{navWidget n}
              $of NavHeaderContainer{}
                <li .navbar__list-item.navbar__list-item--container-selector>
                  ^{navWidget n}
              $of _

        <ul .navbar__list>
          $forall n <- filter isNavHeaderSecondary $ reverse nav
            $case view _1 n
              $of NavHeader{ navLink }
                <li .navbar__list-item :highlightNav navLink:.navbar__list-item--active>
                  ^{navWidget n}
              $of NavHeaderContainer{}
                <li .navbar__list-item.navbar__list-item--container-selector>
                  ^{navWidget n}
              $of _


      $forall n@(NavHeaderContainer{ navHeaderRole }, containerIdent, _, ns) <- filter isNavHeaderContainer nav
        <div .navbar__container-list :navHeaderRole == NavHeaderPrimary:.navbar__container-list--left ##{containerIdent}-container>
          <label .navbar__container-list-closer for=container-radio-none>
            <i .fas .fa-fw .fa-#{iconText IconNavContainerClose}>
          <ul>
            $forall iN@(nl, _, _) <- ns
              <li .navbar__container-list-item :highlightNav nl:.navbar__container-list-item--active>
                ^{navContainerItemWidget n iN}


        $# <li .navbar__list-item--lang-wrapper uw-language-select>
        $#   <input type="checkbox" id="lang-checkbox" uw-no-checkbox>
        $#   <div id="lang-dropdown">
        $#     ^{langFormView'}
        $#   <div .navbar__list-item .navbar__list-item--language>
        $#     <label .navbar__link-wrapper for="lang-checkbox">
        $#       <div .navbar__link-icon>
        $#         <i .fas .fa-2x .fa-flag-alt>
        $#       <div .navbar__link-label>_{MsgMenuLanguage}
