import { GitHubConnectClient } from '@/components/github/github-connect-client';

export default async function Page({
  searchParams,
}: {
  searchParams: Promise<{ installation_id?: string }>;
}) {
  const params = await searchParams;
  return (
    <main className='space-y-6'>
      <div>
        <h1 className='text-3xl font-semibold tracking-normal'>
          Connect GitHub
        </h1>
        <p className='text-muted-foreground mt-2 max-w-2xl'>
          Spoon stores the GitHub App installation ID and uses short-lived
          installation tokens for repository automation.
        </p>
      </div>
      <GitHubConnectClient installationId={params.installation_id} />
    </main>
  );
}
