// src/components/docs/DocsIndexPage.tsx
import { CodeBlock } from "@contractspec/lib.design-system";
import Link from "@contractspec/lib.ui-link";
import { BookOpen, ChevronRight, Shield, Zap } from "lucide-react";
import { jsx, jsxs } from "react/jsx-runtime";
function DocsIndexPage() {
  return /* @__PURE__ */ jsxs("div", {
    className: "space-y-12",
    children: [
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h1", {
            className: "text-4xl font-bold md:text-5xl",
            children: "Documentation"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground max-w-2xl text-lg",
            children: "Stabilize your AI-generated code. Define contracts once, generate consistent code across all surfaces, regenerate safely anytime."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "grid gap-6 md:grid-cols-3",
        children: [
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/getting-started/installation",
            className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
            children: /* @__PURE__ */ jsxs("div", {
              className: "flex items-start justify-between",
              children: [
                /* @__PURE__ */ jsxs("div", {
                  children: [
                    /* @__PURE__ */ jsx("h3", {
                      className: "text-lg font-bold transition-colors group-hover:text-violet-400",
                      children: "Get started"
                    }),
                    /* @__PURE__ */ jsx("p", {
                      className: "text-muted-foreground mt-1 text-sm",
                      children: "Install ContractSpec and define your first contract in minutes."
                    })
                  ]
                }),
                /* @__PURE__ */ jsx(Zap, {
                  size: 20,
                  className: "shrink-0 text-violet-400"
                })
              ]
            })
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/specs/capabilities",
            className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
            children: /* @__PURE__ */ jsxs("div", {
              className: "flex items-start justify-between",
              children: [
                /* @__PURE__ */ jsxs("div", {
                  children: [
                    /* @__PURE__ */ jsx("h3", {
                      className: "text-lg font-bold transition-colors group-hover:text-violet-400",
                      children: "Core contracts"
                    }),
                    /* @__PURE__ */ jsx("p", {
                      className: "text-muted-foreground mt-1 text-sm",
                      children: "Commands, queries, events, and presentations. The building blocks."
                    })
                  ]
                }),
                /* @__PURE__ */ jsx(BookOpen, {
                  size: 20,
                  className: "shrink-0 text-violet-400"
                })
              ]
            })
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/safety/signing",
            className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
            children: /* @__PURE__ */ jsxs("div", {
              className: "flex items-start justify-between",
              children: [
                /* @__PURE__ */ jsxs("div", {
                  children: [
                    /* @__PURE__ */ jsx("h3", {
                      className: "text-lg font-bold transition-colors group-hover:text-violet-400",
                      children: "Safe regeneration"
                    }),
                    /* @__PURE__ */ jsx("p", {
                      className: "text-muted-foreground mt-1 text-sm",
                      children: "Golden tests, migrations, signing, and audit trails."
                    })
                  ]
                }),
                /* @__PURE__ */ jsx(Shield, {
                  size: 20,
                  className: "shrink-0 text-violet-400"
                })
              ]
            })
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/studio",
            className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
            children: /* @__PURE__ */ jsxs("div", {
              className: "flex items-start justify-between",
              children: [
                /* @__PURE__ */ jsxs("div", {
                  children: [
                    /* @__PURE__ */ jsx("h3", {
                      className: "text-lg font-bold transition-colors group-hover:text-violet-400",
                      children: "Studio"
                    }),
                    /* @__PURE__ */ jsx("p", {
                      className: "text-muted-foreground mt-1 text-sm",
                      children: "AI-powered product decision engine for spec-first teams."
                    })
                  ]
                }),
                /* @__PURE__ */ jsx(Zap, {
                  size: 20,
                  className: "shrink-0 text-violet-400"
                })
              ]
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Quick start"
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "card-subtle space-y-4 p-6",
            children: [
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground",
                children: "Add ContractSpec to your project and define your first contract:"
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "bash",
                filename: "docs-quick-start",
                code: `# Install the CLI and core libraries
bun add -D contractspec
bun add @contractspec/lib.contracts-spec @contractspec/lib.schema

# Create your first contract
bun contractspec create --type operation

# Generate implementation
bun contractspec build src/contracts/mySpec.ts`
              }),
              /* @__PURE__ */ jsxs("div", {
                className: "flex flex-wrap gap-2",
                children: [
                  /* @__PURE__ */ jsxs(Link, {
                    href: "/docs/getting-started/installation",
                    className: "btn-primary text-sm",
                    children: [
                      "Installation guide ",
                      /* @__PURE__ */ jsx(ChevronRight, {
                        size: 16
                      })
                    ]
                  }),
                  /* @__PURE__ */ jsx(Link, {
                    href: "/docs/getting-started/hello-world",
                    className: "btn-ghost text-sm",
                    children: "First contract tutorial"
                  })
                ]
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Browse all documentation"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground",
            children: "Use the sidebar or choose a topic to explore spec-first development."
          }),
          /* @__PURE__ */ jsx("div", {
            className: "mt-6 grid gap-4 md:grid-cols-2",
            children: [
              {
                title: "Getting Started",
                description: "Installation, first contract, and CLI usage",
                href: "/docs/getting-started/installation"
              },
              {
                title: "Guides",
                description: "Runnable adoption scenarios with examples",
                href: "/docs/guides"
              },
              {
                title: "Intent Pages",
                description: "SEO-optimized pages for specific developer needs",
                href: "/docs/intent"
              },
              {
                title: "Ecosystem",
                description: "Cursor marketplace plugins, templates, manifest, and integrations",
                href: "/docs/ecosystem/plugins"
              },
              {
                title: "Core Contracts",
                description: "Commands, queries, events, presentations, workflows",
                href: "/docs/specs/capabilities"
              },
              {
                title: "Safe Regeneration",
                description: "Signing, migrations, golden tests, compliance",
                href: "/docs/safety/signing"
              },
              {
                title: "Multi-Surface Output",
                description: "REST, GraphQL, Prisma, MCP tools, React",
                href: "/docs/advanced/renderers"
              },
              {
                title: "Libraries",
                description: "Core runtime libraries and utilities",
                href: "/docs/libraries"
              },
              {
                title: "AI Governance",
                description: "Agents, contract enforcement, approval workflows",
                href: "/docs/libraries/ai-agent"
              },
              {
                title: "Architecture",
                description: "Multi-tenancy, integrations, knowledge sources",
                href: "/docs/architecture"
              },
              {
                title: "Manifesto",
                description: "Our philosophy: compiler not prison",
                href: "/docs/manifesto"
              }
            ].map((topic, i) => /* @__PURE__ */ jsxs(Link, {
              href: topic.href,
              className: "card-subtle group p-4 transition-colors hover:border-violet-500/50",
              children: [
                /* @__PURE__ */ jsx("h3", {
                  className: "font-bold transition-colors group-hover:text-violet-400",
                  children: topic.title
                }),
                /* @__PURE__ */ jsx("p", {
                  className: "text-muted-foreground mt-1 text-sm",
                  children: topic.description
                })
              ]
            }, i))
          })
        ]
      })
    ]
  });
}
export {
  DocsIndexPage
};
