// @bun
// src/components/docs/getting-started/InstallationPage.tsx
import Link from "@contractspec/lib.ui-link";
import { ChevronRight } from "lucide-react";
import { CodeBlock, InstallCommand } from "@contractspec/lib.design-system";
import { jsx, jsxs } from "react/jsx-runtime";
function InstallationPage() {
  return /* @__PURE__ */ jsxs("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-2",
        children: [
          /* @__PURE__ */ jsx("h1", {
            className: "text-4xl font-bold",
            children: "Installation"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-lg",
            children: "Add ContractSpec to your existing Next.js or Bun project, or start fresh."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-6",
        children: [
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Prerequisites"
              }),
              /* @__PURE__ */ jsxs("ul", {
                className: "text-muted-foreground space-y-2",
                children: [
                  /* @__PURE__ */ jsx("li", {
                    children: "Node.js 20+ (or Bun 1.0+)"
                  }),
                  /* @__PURE__ */ jsx("li", {
                    children: "Existing Next.js app or Bun HTTP server"
                  }),
                  /* @__PURE__ */ jsx("li", {
                    children: "PostgreSQL database (for persistence)"
                  })
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Install Core Libraries"
              }),
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground",
                children: "Add the contracts runtime and your choice of adapter:"
              }),
              /* @__PURE__ */ jsx(InstallCommand, {
                package: [
                  "@contractspec/lib.contracts-spec",
                  "@contractspec/lib.schema"
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "For Next.js projects"
              }),
              /* @__PURE__ */ jsx(InstallCommand, {
                package: "@contractspec/lib.contracts-spec"
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "For database models"
              }),
              /* @__PURE__ */ jsx(InstallCommand, {
                package: [
                  "@contractspec/app.cli-database",
                  "prisma",
                  "@prisma/client"
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Set up your project"
              }),
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground",
                children: "Initialize a new ContractSpec project structure:"
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "bash",
                filename: "installation-init",
                code: `bunx contractspec init
# Follow the interactive prompts to configure your project`
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Initialize the database"
              }),
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground",
                children: "If using Prisma, set up your schema and generate the client:"
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "bash",
                filename: "installation-prisma",
                code: `bunx prisma init
# Edit prisma/schema.prisma with your models
bunx prisma generate
bunx prisma migrate dev --name init`
              })
            ]
          }),
          /* @__PURE__ */ jsx("div", {
            className: "flex items-center gap-4 pt-4",
            children: /* @__PURE__ */ jsxs(Link, {
              href: "/docs/getting-started/hello-world",
              className: "btn-primary",
              children: [
                "Next: First Operation ",
                /* @__PURE__ */ jsx(ChevronRight, {
                  size: 16
                })
              ]
            })
          })
        ]
      })
    ]
  });
}
export {
  InstallationPage
};
