import { serverClient } from "@/lib/trpc/server"

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

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

export default async function Header() {
  const languages = await serverClient().contentstack.languageSwitcher.get()

  if (!languages) {
    return null
  }

  return (
    <header className={styles.header}>
      <TopMenu languageUrls={languages.urls} />
      <MainMenu languageUrls={languages.urls} />
    </header>
  )
}
