import { Suspense } from "react"

import { getHeader, getLanguageSwitcher } from "@/lib/trpc/memoizedRequests"

import MainMenu from "./MainMenu"
import TopMenu from "./TopMenu"

import styles from "./header.module.css"

export default function Header() {
  void getHeader()
  void getLanguageSwitcher()
  return (
    <header className={styles.header}>
      <Suspense fallback="Loading top menu">
        <TopMenu />
      </Suspense>
      <Suspense fallback="Loading main menu">
        <MainMenu />
      </Suspense>
    </header>
  )
}
