import type { Metadata } from 'next';
import { getTranslations, type Language } from '@/lib/languages';
import ClientLayout from '@/components/ClientLayout';

export const metadata: Metadata = {
    title: 'CyberCloud - 云端未来',
    description: 'Immersive cloud server experience beyond boundaries',
};

export async function generateStaticParams() {
    return [{ lang: 'zh' }, { lang: 'tw' }, { lang: 'en' }];
}

export default function LangLayout({
    children,
    params,
}: {
    children: React.ReactNode;
    params: { lang: string };
}) {
    const lang = params.lang as Language;
    const t = getTranslations(lang);

    return (
        <ClientLayout lang={lang} t={t}>
            {children}
        </ClientLayout>
    );
}
