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

import { getLang } from "@/i18n/serverContext"

import FooterDetails from "./Details"
import FooterNavigation from "./Navigation"

export default async function Footer() {
  const footerData = await serverClient().contentstack.base.footer({
    lang: getLang(),
  })
  if (!footerData) {
    return null
  }
  console.log("footerData:", footerData)
  return (
    <footer>
      <FooterNavigation {...footerData} />
      <FooterDetails />
    </footer>
  )
}
