import { Locale } from '@/lib/i18n';
import { generateMetadata as generateSEOMetadata } from '@/lib/seo';

interface TestSEOPageProps {
    params: {
        locale: Locale;
    };
}

export async function generateStaticParams() {
    const locales = ['zh-CN', 'zh-TW', 'en'];
    return locales.map((locale) => ({
        locale,
    }));
}

export async function generateMetadata({ params }: TestSEOPageProps) {
    return generateSEOMetadata(params.locale, 'home');
}

export default function TestSEOPage({ params }: TestSEOPageProps) {
    const { locale } = params;

    return (
        <div className="p-8" data-oid="z5fb8n5">
            <h1 data-oid="tzdaaq:">SEO测试页面 - {locale}</h1>
            <p data-oid="p8ykx5x">检查页面的title、description和keywords是否正确显示</p>
            <div className="mt-4" data-oid="ua48xa6">
                <h2 data-oid="w5y4qgq">当前语言: {locale}</h2>
                <p data-oid="uq8d3e7">请查看浏览器标题栏和页面源代码中的meta标签</p>
            </div>
        </div>
    );
}
