import { BirthdaysForm } from '@/components/modules/birthdays-form';
import { getLocale, t } from '@/lib/i18n';
import { getBirthdayDashboard } from '@/lib/module-configs/birthdays';

interface BirthdaysPageProps {
  params: Promise<{ guildId: string }>;
}

export default async function BirthdaysPage({ params }: BirthdaysPageProps) {
  const { guildId } = await params;
  const [locale, config] = await Promise.all([getLocale(), getBirthdayDashboard(guildId)]);

  return (
    <div className="space-y-6">
      <div>
        <h1 className="text-2xl font-semibold">{t(locale, 'modules.birthdays.label')}</h1>
        <p className="text-sm text-muted-foreground">{t(locale, 'modules.birthdays.description')}</p>
      </div>
      <BirthdaysForm guildId={guildId} initialValue={config} />
    </div>
  );
}
