import { TempVoiceForm } from '@/components/modules/tempvoice-form';
import { getLocale, t } from '@/lib/i18n';
import { getTempVoiceDashboard } from '@/lib/module-configs/tempvoice';

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

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

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