{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-columns",
  "type": "registry:block",
  "title": "FAQ, columns",
  "description": "Up to eight questions with their answers always open, laid out in two columns.",
  "categories": [
    "faq"
  ],
  "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"
  ],
  "files": [
    {
      "path": "src/blocks/faq-columns/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-columns/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  /** Header alignment: centred (the default) or at the start, to share the left edge of a left-aligned page. */\n  align: z.enum(['start', 'center']).optional(),\n  /** Questions open and close on click, with a plus that turns, instead of every answer always open (the default). */\n  collapsible: z.boolean().optional(),\n  /** Optional actions in a centred row beneath the questions. Leave both out for none. */\n  primaryAction: link.partial().optional(),\n  secondaryAction: link.partial().optional(),\n  items: z.array(z.object({ question: t(120), answer: t(400) })).min(2).max(8),\n});\n\nexport const spec = defineSpec({\n  type: 'faq-columns',\n  aliases: ['faq/columns'],\n  sourceRuns: ['rmwj0ua7i67a9d6'],\n  name: 'FAQ, columns',\n  category: 'faq',\n  role: 'body',\n  description: 'Up to eight questions with their answers always open, laid out in two columns.',\n  schema,\n  defaults: {\n    eyebrow: 'Section name',\n    title: 'Say what the answers cover',\n    description: 'Say in a sentence or two what to do if the answer is not here, and how soon someone replies.',\n    items: [\n      { question: 'Ask a question customers have', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question customers have', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/faq-columns/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-columns/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { Plus } from 'lucide-react';\nimport { useId } from 'react';\nimport { ActionLink, Container, Section, useEditing } 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 FaqColumns({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const listId = useId();\n  const editing = useEditing();\n  const collapsible = props.collapsible === true && !editing;\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} align={props.align === 'start' ? 'left' : 'center'} />\n        <ul className={`mt-14 grid gap-x-16 ${collapsible ? 'items-start' : 'gap-y-10'} @3xl:grid-cols-2`}>\n          {props.items.map((item, i) => {\n            const question = <Text path={['items', i, 'question']} value={item.question} as={collapsible ? 'span' : 'h3'} className=\"text-kh-heading font-semibold\" />;\n            const answer = <Text path={['items', i, 'answer']} value={item.answer} as=\"p\" multiline className={collapsible ? 'pb-6 pr-10 text-kh-body text-kh-muted' : 'mt-3 text-kh-body text-kh-muted'} />;\n            if (collapsible)\n              return (\n                <li key={i} className=\"border-t border-kh-line\">\n                  <details name={listId} className=\"group\">\n                    <summary className=\"flex min-h-14 cursor-pointer list-none items-start justify-between gap-6 py-6 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus) [&::-webkit-details-marker]:hidden\">\n                      {question}\n                      <Plus aria-hidden className=\"mt-1 size-5 shrink-0 text-kh-muted transition-transform duration-(--kh-dur) group-open:rotate-45\" />\n                    </summary>\n                    {answer}\n                  </details>\n                </li>\n              );\n            return (\n              <li key={i} className=\"border-t border-kh-line pt-6\">\n                {question}\n                {answer}\n              </li>\n            );\n          })}\n        </ul>\n        {(props.primaryAction || props.secondaryAction) && (\n          <div className=\"mt-12 flex flex-wrap items-center justify-center gap-4\">\n            {props.primaryAction && <ActionLink path={['primaryAction']} value={{ label: props.primaryAction.label ?? '', href: props.primaryAction.href ?? '' }} size=\"md\" />}\n            {props.secondaryAction && <ActionLink path={['secondaryAction']} value={{ label: props.secondaryAction.label ?? '', href: props.secondaryAction.href ?? '' }} variant=\"secondary\" size=\"md\" />}\n          </div>\n        )}\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(FaqColumns);\n"
    }
  ]
}
