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

import { DepartmentsContent } from './departments-content';

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

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

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

/**
 * Admin Departments page - Server Component
 */
export default function DepartmentsPage({ params: { locale } }: DepartmentsPageProps) {
  return <DepartmentsContent locale={locale} />;
}
