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

import { UsersContent } from './users-content';

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

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

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

/**
 * Admin Users page - Server Component
 */
export default function UsersPage({ params: { locale } }: UsersPageProps) {
  return <UsersContent locale={locale} />;
}
