[@@@ocaml.warning "-26-27"]

open React

type actor = AccountSwitcher.actor

let pages =
  [ ("Account", "/account")
  ; ("Security", "/account/security")
  ; ("Identity", "/account/identity")
  ; ("Permissions", "/account/permissions") ]

let[@react.component] make ~current_user ~logged_in_users ~active_page () =
  <Sidebar
    pages
    active_page
    header=(<AccountSwitcher
              current_user logged_in_users add_account_url="/account/login"
            />)
    footer=(<a
              href=( "/account/logout?did="
                   ^ Js.Global.encodeURIComponent current_user.did )>
              <Button
                kind=`Secondary
                className="mt-2 justify-start pl-0 active:shadow-none \
                           focus-visible:shadow-none">
                (string "log out")
              </Button>
            </a>)
  />
