{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-split",
  "type": "registry:block",
  "title": "Call to action, split",
  "description": "A panel with a headline, one or two actions and an image beside the copy.",
  "categories": [
    "cta"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/cta-split/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/cta-split/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\n// Limits (KB-178): description raised to 900 for the longest real text, 780 chars (tetris-flytt); blank lines draw as paragraph gaps. The buttons are optional (a section may carry only copy).\nconst schema = z.object({\n  title: t(120),\n  description: t(900),\n  primary: link.optional(),\n  secondary: link.optional(),\n  media,\n  // frame: 'open' draws the copy and the picture straight on the page (no bordered panel): the picture a separate rounded, shadowed block with a gap\n  // between the columns, and on a phone the copy first, the picture under it.\n  frame: z.enum(['panel', 'open']).optional(),\n  // titleSize: 'heading' sets the headline at ordinary heading size instead of the display title size.\n  titleSize: z.enum(['title', 'heading']).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'cta-split',\n  aliases: ['cta/split'],\n  sourceRuns: ['rmwj03p9ad205ef', 'rmwj0tmwx83408b'],\n  name: 'Call to action, split',\n  category: 'cta',\n  role: 'body',\n  description: 'A panel with a headline, one or two actions and an image beside the copy.',\n  schema,\n  defaults: {\n    title: 'Say what the visitor can do next',\n    description: 'Say in a sentence or two what the first step is and what it costs.',\n    primary: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#demo' },\n    media: { src: '', alt: 'Show the offer in use, in a wide shot' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/cta-split/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/cta-split/index.tsx",
      "content": "import { useId } from 'react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Section } from '../_shared/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 CtaSplit({ props }: BlockProps<Props>) {\n  const id = useId();\n  const open = props.frame === 'open';\n  return (\n    <Section labelledBy={id} className=\"py-16 @3xl:py-24\">\n      <Container>\n        <div className={open ? 'grid items-center gap-12 @3xl:grid-cols-2 @3xl:gap-16' : 'grid overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface @3xl:grid-cols-2'}>\n          <div className={open ? 'flex flex-col justify-center' : 'flex flex-col justify-center px-8 py-12 @3xl:px-14 @3xl:py-16'}>\n            <div id={id}>\n              <Text path={['title']} value={props.title} as=\"h2\" className={props.titleSize === 'heading' ? 'text-kh-heading font-semibold' : 'text-kh-title font-semibold'} />\n            </div>\n            <Text path={['description']} value={props.description} as=\"p\" multiline className=\"mt-4 max-w-kh-lead whitespace-pre-line text-kh-lead text-kh-muted\" />\n            {(props.primary || props.secondary) && (\n            <div className=\"mt-8 flex flex-wrap gap-3\">\n              {props.primary && <ActionLink path={['primary']} value={props.primary} />}\n              {props.secondary && <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" />}\n            </div>\n          )}\n          </div>\n          <div className={open ? undefined : 'order-first @3xl:order-none'}>\n            <Media path={['media']} value={props.media} ratio=\"4 / 3\" className={open ? 'rounded-kh-xl shadow-kh-2' : '@3xl:h-full @3xl:!aspect-auto'} />\n          </div>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(CtaSplit);\n"
    }
  ]
}
