import { CheckCircle2 } from 'lucide-react'

const agents = [
  { name: 'Claude Code', org: 'anthropics', url: 'https://docs.anthropic.com/en/docs/claude-code' },
  { name: 'Codex', org: 'openai', url: 'https://github.com/openai/codex' },
  { name: 'Cursor', org: 'getcursor', url: 'https://cursor.com' },
  { name: 'Aider', org: 'Aider-AI', url: 'https://aider.chat' },
  { name: 'Goose', org: 'block', url: 'https://github.com/block/goose' },
  { name: 'Amp', org: 'sourcegraph', url: 'https://ampcode.com' },
  { name: 'Gemini CLI', org: 'google-gemini', url: 'https://github.com/google-gemini/gemini-cli' },
  { name: 'Cline', org: 'cline', url: 'https://cline.bot' },
  { name: 'OpenCode', org: 'nicepkg', url: 'https://opencode.ai/' },
  { name: 'Copilot', org: 'github', url: 'https://github.com/features/copilot' },
]

export function Agents() {
  return (
    <section className="py-24 px-6 border-t border-border/30">
      <div className="mx-auto max-w-5xl">
        <div className="max-w-2xl mb-12">
          <div className="flex items-center gap-2 mb-4">
            <CheckCircle2 className="h-4 w-4 text-primary" />
            <span className="text-xs font-sans uppercase tracking-wider text-primary font-medium">
              Compatibility
            </span>
          </div>
          <h2 className="font-serif text-3xl sm:text-4xl font-semibold tracking-tight mb-4">
            Works with every agent.
          </h2>
          <p className="text-muted-foreground font-serif text-lg leading-relaxed">
            All agents work perfectly inside their sandbox but can&apos;t impact anything outside
            it. No agent-specific configuration needed.
          </p>
        </div>

        <div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3">
          {agents.map((agent) => (
            <a
              key={agent.name}
              href={agent.url}
              target="_blank"
              rel="noopener noreferrer"
              className="group flex items-center gap-3 p-4 rounded-lg border border-border/40 bg-card/30 hover:border-primary/20 hover:bg-card/50 transition-all cursor-pointer"
            >
              <img
                src={`https://github.com/${agent.org}.png?size=64`}
                alt={agent.name}
                width={28}
                height={28}
                className="rounded-md shrink-0 bg-muted"
              />
              <span className="text-sm font-sans font-medium text-foreground group-hover:text-primary truncate transition-colors">
                {agent.name}
              </span>
            </a>
          ))}
        </div>
      </div>
    </section>
  )
}
