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

import { DashboardContent } from './dashboard-content';

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

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

  return {
    title: t('title'),
  };
}

/**
 * Dashboard page - Server Component
 * Acts as the entry point for the dashboard with customizable widgets
 */
export default function DashboardPage({ params: { locale } }: DashboardPageProps) {
  return <DashboardContent locale={locale} />;
}
