import { baseUrls } from "@/constants/routes/baseUrls"
import { serverClient } from "@/lib/trpc/server"

import Header from "@/components/Current/Header"
import LanguageSwitcher from "@/components/Current/Header/LanguageSwitcher"
import MyPagesMobileDropdown from "@/components/Current/Header/MyPagesMobileDropdown"

import { LangParams, PageArgs } from "@/types/params"

export default async function HeaderPage({ params }: PageArgs<LangParams>) {
  const navigation = await serverClient().contentstack.myPages.navigation.get()
  return (
    <Header
      lang={params.lang}
      myPagesMobileDropdown={
        <MyPagesMobileDropdown navigation={navigation} lang={params.lang} />
      }
      languageSwitcher={<LanguageSwitcher urls={baseUrls} lang={params.lang} />}
    />
  )
}
