import type { Metadata } from 'next'
import { getLocale } from 'next-intl/server'
import AnalyticsPageClient from './AnalyticsPageClient'

const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'

export async function generateMetadata(): Promise<Metadata> {
  const locale = await getLocale()
  const isZh = false  // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
  const title = isZh ? '交易分析与表现' : 'Trading Analytics & Performance'
  const description = isZh
    ? '查看胜率、最大回撤、平均持仓时间、信号准确率和历史交易表现，评估 Trump Alpha 的真实执行质量。'
    : 'Review win rate, drawdown, average hold time, signal accuracy, and historical trade performance to evaluate live execution quality.'
  return {
    title,
    description,
    alternates: {
      canonical: `${siteUrl}/${locale}/analytics`,
      languages: {
        en: `${siteUrl}/en/analytics`,
      },
    },
  }
}

export default function AnalyticsPage() {
  return <AnalyticsPageClient />
}
