{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer-cta",
  "type": "registry:block",
  "title": "Footer, with a call to action",
  "description": "A footer that opens with one last ask: a large headline, a sentence and two buttons on a tinted panel, then the brand, two to four link columns and the legal row. Saves a separate call-to-action section on short pages.",
  "categories": [
    "footer"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-d-chrome.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/footer-cta/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/footer-cta/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, req, t, mark } from '../_shared/schema';\n\nconst schema = z.object({\n  brand: req(40),\n  /** The brand mark before the wordmark: SVG paths in currentColor (or an image src), cap-height tall, aria-hidden. */\n  mark,\n  ctaTitle: req(100),\n  ctaText: t(200),\n  cta: link,\n  secondary: link,\n  columns: z.array(z.object({ title: req(40), links: z.array(link).max(6) })).min(2).max(4),\n  legal: t(120),\n  legalLinks: z.array(link).max(4),\n});\n\nexport const spec = defineSpec({\n  type: 'footer-cta',\n  aliases: ['footer/cta'],\n  name: 'Footer, with a call to action',\n  category: 'footer',\n  role: 'foot',\n  description: 'A footer that opens with one last ask: a large headline, a sentence and two buttons on a tinted panel, then the brand, two to four link columns and the legal row. Saves a separate call-to-action section on short pages.',\n  schema,\n  defaults: {\n    brand: 'Brand name',\n    ctaTitle: 'Name the next step you want',\n    ctaText: 'Say what the visitor gets and what starting costs them.',\n    cta: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#contact' },\n    columns: [\n      { title: 'First group', links: [{ label: 'First page', href: '#product' }, { label: 'Second page', href: '#calendar' }, { label: 'Third page', href: '#pricing' }] },\n      { title: 'Second group', links: [{ label: 'First page', href: '#about' }, { label: 'Second page', href: '#journal' }, { label: 'Third page', href: '#careers' }] },\n      { title: 'Third group', links: [{ label: 'First page', href: '#guides' }, { label: 'Second page', href: '#status' }, { label: 'Third page', href: '#contact' }] },\n    ],\n    legal: '© 0000 Company name',\n    legalLinks: [{ label: 'Privacy', href: '#privacy' }, { label: 'Terms', href: '#terms' }],\n  },\n});\n"
    },
    {
      "path": "src/blocks/footer-cta/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/footer-cta/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { ActionLink, Container, Gate, Opt, Mark } from '../_shared/kit';\nimport { FOCUS } from '../_shared/d-chrome-kit';\nimport { cn } from '../../lib/utils';\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\nconst COLS = { 2: 'grid-cols-2', 3: 'grid-cols-2 @xl:grid-cols-3', 4: 'grid-cols-2 @xl:grid-cols-4' } as const;\n\nfunction FooterCta({ props }: BlockProps<Props>) {\n  const n = Math.min(4, Math.max(2, props.columns.length)) as 2 | 3 | 4;\n  const link = cn('inline-flex min-h-8 items-center rounded-kh-sm text-kh-small text-kh-muted transition-colors hover:text-kh-ink', FOCUS);\n  return (\n    <footer className=\"border-t border-kh-line bg-kh-canvas pb-8 pt-16\">\n      <Container>\n        <div className=\"flex flex-col gap-8 rounded-kh-xl bg-kh-accent-soft p-8 @3xl:flex-row @3xl:items-center @3xl:justify-between @3xl:p-12\">\n          <div className=\"min-w-0 max-w-xl\">\n            <Text path={['ctaTitle']} value={props.ctaTitle} as=\"h2\" className=\"text-kh-title font-semibold\" />\n            <Opt path={['ctaText']} value={props.ctaText} className=\"mt-3 text-kh-body text-kh-muted\" placeholder=\"Text\" />\n          </div>\n          <div className=\"flex min-w-0 max-w-full flex-wrap gap-3 @3xl:shrink-0 @3xl:max-w-[60%]\">\n            <ActionLink path={['cta']} value={props.cta} />\n            <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" />\n          </div>\n        </div>\n        <div className=\"mt-14 grid gap-12 @3xl:grid-cols-[1fr_2.5fr]\">\n          <p className=\"flex items-center gap-(--kh-mark-gap) text-kh-heading font-semibold tracking-tight\"><Mark mark={props.mark} /><Text path={['brand']} value={props.brand} as=\"span\" /></p>\n          <div className={cn('grid gap-x-8 gap-y-10', COLS[n])}>\n            {props.columns.map((c, i) => (\n              <nav key={i} aria-label={c.title}>\n                <Text path={['columns', i, 'title']} value={c.title} as=\"h2\" className=\"text-kh-small font-semibold\" />\n                <ul className=\"mt-3 space-y-1\">\n                  {c.links.map((l, j) => (\n                    <Gate key={j} label={l.label}>\n                      <li>\n                        <a href={safeHref(l.href)} className={link}>\n                          <Text path={['columns', i, 'links', j, 'label']} value={l.label} as=\"span\" />\n                        </a>\n                      </li>\n                    </Gate>\n                  ))}\n                </ul>\n              </nav>\n            ))}\n          </div>\n        </div>\n        <div className=\"mt-14 flex flex-col gap-2 border-t border-kh-line pt-5 @2xl:flex-row @2xl:items-center @2xl:justify-between\">\n          <Opt path={['legal']} value={props.legal} className=\"text-kh-caption text-kh-muted\" placeholder=\"Legal\" />\n          {props.legalLinks.some((l) => l.label) && (\n            <ul className=\"-mx-2 flex flex-wrap\">\n              {props.legalLinks.map((l, i) => (\n                <Gate key={i} label={l.label}>\n                  <li>\n                    <a href={safeHref(l.href)} className={cn(link, 'px-2 text-kh-caption')}>\n                      <Text path={['legalLinks', i, 'label']} value={l.label} as=\"span\" />\n                    </a>\n                  </li>\n                </Gate>\n              ))}\n            </ul>\n          )}\n        </div>\n      </Container>\n    </footer>\n  );\n}\n\nexport default withHeadingLevel(FooterCta);\n"
    }
  ]
}
