import { Metadata } from 'next';
import { getTranslations } from 'next-intl/server';
import { EmployeesContent } from './employees-content';

export async function generateMetadata({
  params,
}: {
  params: Promise<{ locale: string }>;
}): Promise<Metadata> {
  const { locale } = await params;
  const t = await getTranslations({ locale, namespace: 'hr' });

  return {
    title: t('employees.title'),
    description: t('employees.description'),
  };
}

export default async function EmployeesPage({
  params,
}: {
  params: Promise<{ locale: string }>;
}) {
  const { locale } = await params;
  return <EmployeesContent locale={locale} />;
}
