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

import { AbsenceRequestsContent } from './absence-requests-content';

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

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

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

/**
 * Absence requests page for managers - Server Component
 * Shows pending requests for approval
 */
export default function AbsenceRequestsPage({ params: { locale } }: AbsenceRequestsPageProps) {
  return <AbsenceRequestsContent locale={locale} />;
}
