// src/components/docs/shared/StudioPrompt.tsx
import Link from "@contractspec/lib.ui-link";
import { jsx, jsxs } from "react/jsx-runtime";
function StudioPrompt({
  title = "Want to turn product signals into spec-first deliverables?",
  body = "ContractSpec Studio ingests evidence from meetings, support, analytics, docs, and code, then compiles decisions into spec diffs and task packs.",
  ctaLabel = "Try Studio",
  href = "https://www.contractspec.studio"
}) {
  return /* @__PURE__ */ jsxs("div", {
    className: "card-subtle space-y-3 p-6",
    children: [
      /* @__PURE__ */ jsx("h3", {
        className: "text-lg font-semibold",
        children: title
      }),
      /* @__PURE__ */ jsx("p", {
        className: "text-muted-foreground text-sm",
        children: body
      }),
      /* @__PURE__ */ jsx(Link, {
        href,
        className: "btn-primary",
        children: ctaLabel
      })
    ]
  });
}

// src/components/docs/guides/GuideDocsPipelinePage.tsx
import { CodeBlock } from "@contractspec/lib.design-system";
import Link2 from "@contractspec/lib.ui-link";
import { ChevronRight } from "lucide-react";
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
function GuideDocsPipelinePage() {
  return /* @__PURE__ */ jsxs2("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs2("div", {
        className: "space-y-3",
        children: [
          /* @__PURE__ */ jsx2("h1", {
            className: "text-4xl font-bold",
            children: "Build the docs pipeline"
          }),
          /* @__PURE__ */ jsx2("p", {
            className: "text-muted-foreground text-lg",
            children: "Generate reference docs, chunk the index, and wire the docs pages the same way this repo does."
          })
        ]
      }),
      /* @__PURE__ */ jsxs2("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx2("h2", {
            className: "text-2xl font-bold",
            children: "What you'll build"
          }),
          /* @__PURE__ */ jsxs2("ul", {
            className: "text-muted-foreground space-y-2 text-sm",
            children: [
              /* @__PURE__ */ jsx2("li", {
                children: "Generated Markdown and a chunked index manifest."
              }),
              /* @__PURE__ */ jsx2("li", {
                children: "Reference routes powered by the docs loader."
              }),
              /* @__PURE__ */ jsx2("li", {
                children: "Versioned outputs you can publish per release."
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs2("div", {
        className: "space-y-6",
        children: [
          /* @__PURE__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "1) Generate contract docs"
              }),
              /* @__PURE__ */ jsx2(CodeBlock, {
                language: "bash",
                filename: "generate-contract-docs",
                code: `contractspec generate`
              }),
              /* @__PURE__ */ jsxs2("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "Expected output: Markdown in ",
                  /* @__PURE__ */ jsx2("code", {
                    children: "generated/docs"
                  }),
                  "."
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "2) Build the docs index"
              }),
              /* @__PURE__ */ jsx2(CodeBlock, {
                language: "bash",
                filename: "docs-generate",
                code: `bun docs:generate
# versioned output
bun docs:generate -- --version v1.0.0`
              }),
              /* @__PURE__ */ jsxs2("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "This writes ",
                  /* @__PURE__ */ jsx2("code", {
                    children: "docs-index.manifest.json"
                  }),
                  " and chunked",
                  /* @__PURE__ */ jsx2("code", {
                    children: "docs-index.*.json"
                  }),
                  " files in the generated docs bundle."
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "3) Wire reference routes"
              }),
              /* @__PURE__ */ jsx2(CodeBlock, {
                language: "tsx",
                filename: "docs-reference-route",
                code: `import { notFound } from "next/navigation";
import {
  DocsReferenceIndexPage,
  DocsReferencePage,
  getGeneratedDocById,
  listGeneratedDocs,
} from "@contractspec/bundle.library";

export async function generateStaticParams() {
  const docs = await listGeneratedDocs();
  return docs.map((doc) => ({ slug: doc.id.split("/") }));
}

export default async function Page({ params }: { params: { slug?: string[] } }) {
  const slug = params.slug?.join("/") ?? "";
  const doc = await getGeneratedDocById(slug);
  if (!doc) notFound();
  return <DocsReferencePage entry={doc.entry} content={doc.content} />;
}`
              }),
              /* @__PURE__ */ jsxs2("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "Use the index page on ",
                  /* @__PURE__ */ jsx2("code", {
                    children: "/docs/reference"
                  }),
                  " to render the searchable list."
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsxs2("div", {
            className: "card-subtle space-y-3 p-6",
            children: [
              /* @__PURE__ */ jsx2("h3", {
                className: "text-lg font-semibold",
                children: "Repo reference"
              }),
              /* @__PURE__ */ jsxs2("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "This repo wires docs under",
                  " ",
                  /* @__PURE__ */ jsx2("code", {
                    children: "packages/apps/web-landing/src/app/docs/reference"
                  }),
                  "."
                ]
              })
            ]
          }),
          /* @__PURE__ */ jsx2(StudioPrompt, {
            title: "Need decision-to-export automation?",
            body: "Studio exports evidence-backed spec changes and task packs to Linear, Jira, Notion, and GitHub."
          })
        ]
      }),
      /* @__PURE__ */ jsxs2("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs2(Link2, {
            href: "/docs/guides/ci-contract-diff-gating",
            className: "btn-primary",
            children: [
              "Next: CI gating ",
              /* @__PURE__ */ jsx2(ChevronRight, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx2(Link2, {
            href: "/docs/guides",
            className: "btn-ghost",
            children: "Back to guides"
          })
        ]
      })
    ]
  });
}
export {
  GuideDocsPipelinePage
};
