{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comparison-cards",
  "type": "registry:block",
  "title": "Comparison, who it is for",
  "description": "Two or three cards that each say who a choice is right for (\"Choose us if\", \"Choose a spreadsheet if\") with a few reasons, and an optional honest closing line. For comparisons where the answer depends on the reader, not a feature count.",
  "categories": [
    "comparison"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/comparison-cards/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/comparison-cards/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  /** Each card says who it is right for. The first is yours. */\n  cards: z\n    .array(z.object({ heading: t(60), points: z.array(t(100)).min(2).max(4) }))\n    .min(2)\n    .max(3),\n  /** An optional closing line that admits when the alternative is the better choice. */\n  honest: t(200).optional(),\n  cta: link,\n});\n\nexport const spec = defineSpec({\n  type: 'comparison-cards',\n  aliases: ['comparison/cards'],\n  name: 'Comparison, who it is for',\n  category: 'comparison',\n  role: 'body',\n  description: 'Two or three cards that each say who a choice is right for (\"Choose us if\", \"Choose a spreadsheet if\") with a few reasons, and an optional honest closing line. For comparisons where the answer depends on the reader, not a feature count.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the topic',\n    title: 'Say how to choose',\n    description: 'Say honestly what the choice depends on and what to weigh, in one or two sentences.',\n    cards: [\n      { heading: 'Say when to pick the first', points: ['Name a first need', 'Name a second need, in a short line', 'Name a third need, in a short line'] },\n      { heading: 'Say when to pick the second', points: ['Name a first need, with its details', 'Name a second need, briefly', 'Name a third need, in a short line'] },\n      { heading: 'Say when to pick the third', points: ['Name a first need, with its details', 'Name a second need, in a short line'] },\n    ],\n    honest: 'Say honestly when another option is the better choice, and when it makes sense to come back.',\n    cta: { label: 'Main action', href: '#fit' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/comparison-cards/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/comparison-cards/index.tsx",
      "content": "import { Check } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { cn } from '../../lib/utils';\nimport { ActionLink, Container, Opt, Section } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\nfunction ComparisonCards({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <ul className={cn('mt-12 grid gap-6', props.cards.length === 2 ? '@3xl:grid-cols-2' : '@3xl:grid-cols-3')}>\n          {props.cards.map((c, i) => (\n            <li key={i} className={cn('flex flex-col gap-5 rounded-kh-xl border p-8', i === 0 ? 'border-kh-accent bg-kh-accent-soft' : 'border-kh-line bg-kh-surface')}>\n              <Text path={['cards', i, 'heading']} value={c.heading} as=\"h3\" className=\"text-kh-heading font-semibold\" />\n              <ul className=\"flex flex-col gap-3\">\n                {c.points.map((p, k) => (\n                  <li key={k} className=\"flex items-start gap-2 text-kh-body\">\n                    <Check aria-hidden className=\"mt-1 size-4 shrink-0 text-kh-accent-ink\" />\n                    <Text path={['cards', i, 'points', k]} value={p} as=\"span\" />\n                  </li>\n                ))}\n              </ul>\n            </li>\n          ))}\n        </ul>\n        <Opt path={['honest']} value={props.honest} className=\"mt-10 max-w-kh-lead text-kh-body text-kh-muted\" placeholder=\"An honest closing line\" />\n        <ActionLink path={['cta']} value={props.cta} variant=\"primary\" size=\"lg\" className=\"mt-8\" />\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ComparisonCards);\n"
    }
  ]
}
