import { Metadata } from 'next';
import { getTranslations } from 'next-intl/server';
import { NewEmployeeContent } from './new-employee-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.new'),
    description: t('employees.newDescription'),
  };
}

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