import type { Metadata } from 'next'
import { getTranslations, setRequestLocale } from 'next-intl/server'
import { ClientDownload } from '@/components/ClientDownload'

export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
  const { locale } = await params
  const t = await getTranslations({ locale, namespace: 'UI' })
  return { title: t('clientDownload.pageTitle') }
}

export default async function DownloadClientPage({ params }: { params: Promise<{ locale: string }> }) {
  const { locale } = await params
  setRequestLocale(locale)
  const t = await getTranslations('UI')
  return (
    <div className="main-page">
      <div className="middle-content">
        <div className="body-content">
          <div className="title-content">
            <h1>{t('clientDownload.pageTitle')}</h1>
          </div>
          <ClientDownload />
        </div>
      </div>
    </div>
  )
}
