import { MessagesManager } from '@/components/modules/messages-manager';
import { getLocale, t } from '@/lib/i18n';

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

export default async function MessagesPage({ params }: MessagesPageProps) {
  const { guildId } = await params;
  const locale = await getLocale();

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