{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "case-study-problem-solution",
  "type": "registry:block",
  "title": "Case-study, problem solution",
  "description": "A centred heading and line, then a framed picture on the left and short titled parts with one button on the right; on a phone the picture sits above the text.",
  "categories": [
    "case-study"
  ],
  "dependencies": [
    "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/case-study-problem-solution/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/case-study-problem-solution/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\nconst part = z.object({\n  title: t(30),\n  body: t(320),\n});\n\nconst schema = z.object({\n  title: t(60),\n  description: t(120),\n  media,\n  caption: t(40),\n  /** The parts beside the picture, each a small heading over a paragraph. */\n  parts: z.array(part).min(2).max(4),\n  cta: link,\n});\n\nexport const spec = defineSpec({\n  type: 'case-study-problem-solution',\n  aliases: ['case-study/problem-solution'],\n  name: 'Case-study, problem solution',\n  category: 'case-study',\n  role: 'body',\n  description: 'A centred heading and line, then a framed picture on the left and short titled parts with one button on the right; on a phone the picture sits above the text.',\n  schema,\n  defaults: {\n    title: 'Say what the visitor will see in action',\n    description: 'Say in one line what changes for the reader once this is in place.',\n    media: { src: '', alt: 'Show the example the parts below describe' },\n    caption: 'Add a short note on the picture',\n    parts: [\n      { title: 'Name the problem', body: 'Describe in two sentences the situation the visitor recognises and what it costs them today.' },\n      { title: 'Name the solution', body: 'Describe in two sentences what changes for the visitor once your service is in place.' },\n      { title: 'Name the result', body: 'Describe in two sentences the outcome the visitor ends up with and what to do to get it.' },\n    ],\n    cta: { label: 'Start here', href: '#start' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/case-study-problem-solution/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/case-study-problem-solution/index.tsx",
      "content": "import { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Opt, Section } from '../_shared/kit';\nimport { 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 CaseStudyProblemSolution({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <div className=\"mx-auto max-w-3xl text-center\">\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className=\"text-kh-display font-semibold leading-[1.1] tracking-tight\" />\n          </div>\n          <Opt path={['description']} value={props.description} as=\"p\" className=\"mt-4 text-kh-lead text-kh-muted\" />\n        </div>\n        <div className=\"mt-12 grid items-center gap-10 @4xl:grid-cols-2 @4xl:gap-12\">\n          <figure className=\"flex flex-col gap-3\">\n            <Opt path={['caption']} value={props.caption} as=\"figcaption\" className=\"text-kh-small italic text-kh-muted\" />\n            <div className=\"overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface p-2 shadow-kh-1\">\n              <Media path={['media']} value={props.media} ratio=\"1 / 1\" className=\"rounded-kh-lg\" />\n            </div>\n          </figure>\n          <div className=\"flex flex-col gap-6\">\n            {props.parts.slice(0, 4).map((p, i) => (\n              <div key={i}>\n                <Text path={['parts', i, 'title']} value={p.title} as=\"h3\" className=\"text-kh-heading font-semibold text-kh-accent-ink\" />\n                <Text path={['parts', i, 'body']} value={p.body} as=\"p\" multiline className=\"mt-2 text-kh-muted\" />\n              </div>\n            ))}\n            <div className=\"pt-2\">\n              <ActionLink path={['cta']} value={props.cta} variant=\"primary\" />\n            </div>\n          </div>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(CaseStudyProblemSolution);\n"
    }
  ]
}
