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

import Desktop from "@/components/Current/Header/LanguageSwitcher/Desktop"
import Mobile from "@/components/Current/Header/LanguageSwitcher/Mobile"

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

export default async function LanguageSwitcher() {
  const data = await serverClient().contentstack.accountPage.languageSwitcher()

  return (
    <>
      <section className={styles.desktop}>
        <Desktop currentLanguage={data.lang} urls={data.urls} />
      </section>
      <section className={styles.mobile}>
        <Mobile currentLanguage={data.lang} urls={data.urls} />
      </section>
    </>
  )
}
