import { StarboardForm } from '@/components/modules/starboard-form';
import { getLocale, t } from '@/lib/i18n';
import { getStarboardDashboard } from '@/lib/module-configs/starboard';

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

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

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