import { Metadata } from 'next';
import { getTranslations } from 'next-intl/server';

import { PreferencesContent } from './preferences-content';

interface PreferencesPageProps {
  params: { locale: string };
}

export async function generateMetadata(): Promise<Metadata> {
  const t = await getTranslations('settings');

  return {
    title: `${t('preferencesTitle')} - ${t('title')}`,
  };
}

/**
 * Preferences settings page - Server Component
 */
export default function PreferencesPage({ params: { locale } }: PreferencesPageProps) {
  return <PreferencesContent locale={locale} />;
}
