sidebar = (brand, sections, currentUrl) =>
  ul(
    {
      class: "navbar-nav sidebar sidebar-dark accordion d-print-none",
      id: "accordionSidebar",
    },
    a(
      {
        class: "sidebar-brand d-flex align-items-center justify-content-center",
        href: "/",
      },
      brand.logo &&
        div(
          { class: "sidebar-brand-icon" },
          img({ src: brand.logo, width: "35", height: "35", alt: "Logo" })
        ),
      div({ class: "sidebar-brand-text mx-3" }, brand.name)
    ),
    sections.map(sideBarSection(currentUrl)),
    hr({ class: "sidebar-divider d-none d-md-block" }),
    div(
      { class: "text-center d-none d-md-inline" },
      button({
        class: "rounded-circle border-0",
        "data-sidebar-toggler": true,
        id: "sidebarToggle",
      })
    )
  )
@param {object} brand
@param {string[]} sections
@param {string} currentUrl
@returns {ul}