{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-booking-link",
  "type": "registry:block",
  "title": "Contact, booking link",
  "description": "A card for booking a call in an external calendar: the person (photo, name, role), how long it is, what happens in the call, one primary link to the calendar page, and an email for people who prefer that. No time slots are drawn: the calendar owns them.",
  "categories": [
    "contact"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "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/text-link.json"
  ],
  "files": [
    {
      "path": "src/blocks/contact-booking-link/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/contact-booking-link/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, req, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60).optional(),\n  title: req(120),\n  description: t(300).optional(),\n  person: z.object({ name: req(60), role: t(80), photo: media }),\n  /** How long the meeting is, in words: \"30 minutes\". */\n  length: t(30),\n  lengthLabel: t(30),\n  whatTitle: t(60),\n  /** What happens in the call. Two to four short points. */\n  points: z.array(t(120)).min(2).max(4),\n  /** The one primary action: it goes to the external calendar page. No time slots are drawn here. */\n  link: z.object({ label: req(40), href: t(300) }),\n  /** Open the calendar in a new tab (with rel=\"noopener noreferrer\"). Default: the same tab. */\n  newTab: z.boolean().optional(),\n  /** An alternative way to reach the person. Optional: an empty email drops it. */\n  alt: z.object({ label: t(60), email: t(80) }).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'contact-booking-link',\n  aliases: ['contact/booking-link'],\n  name: 'Contact, booking link',\n  category: 'contact',\n  role: 'body',\n  description: 'A card for booking a call in an external calendar: the person (photo, name, role), how long it is, what happens in the call, one primary link to the calendar page, and an email for people who prefer that. No time slots are drawn: the calendar owns them.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the section',\n    title: 'Say who they will talk to',\n    description: 'Say in one sentence what the call is for and what it is not.',\n    person: { name: 'Name a person', role: 'Their role and company', photo: { src: '', alt: 'A portrait of the person, in daylight' } },\n    length: '00 minutes',\n    lengthLabel: 'Length',\n    whatTitle: 'Say what happens in the call',\n    points: ['Say what they tell you about their situation.', 'Say what you tell them in return, briefly.', 'Say what they walk away with from the call.'],\n    link: { label: 'Main action', href: '#calendar' },\n    newTab: false,\n    alt: { label: 'Offer another way', email: 'hello@yourcompany.example' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/contact-booking-link/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/contact-booking-link/index.tsx",
      "content": "import { useId } from 'react';\nimport { CalendarDays, Clock } from 'lucide-react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { ButtonLink } from '../../ui/button';\nimport { TextLink } from '../../ui/text-link';\nimport { Avatar, Container, Eyebrow, Opt, Section, useEditing } 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 ContactBookingLink({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  const out = props.newTab ? { target: '_blank', rel: 'noopener noreferrer' } : {};\n  return (\n    <Section labelledBy={id}>\n      <Container width=\"narrow\">\n        <div className=\"rounded-kh-xl border border-kh-line bg-kh-surface p-6 shadow-kh-1 @xl:p-8\">\n          <Eyebrow path={['eyebrow']} value={props.eyebrow} />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className=\"text-kh-title font-semibold\" />\n          </div>\n          <Opt path={['description']} value={props.description} className=\"mt-3 text-kh-lead text-kh-muted\" placeholder=\"Description\" />\n          <div className=\"mt-6 flex items-center gap-4\">\n            {props.person.photo.src || editing ? (\n              <Media path={['person', 'photo']} value={props.person.photo} ratio=\"1/1\" className=\"size-16 shrink-0 overflow-hidden rounded-kh-pill border border-kh-line\" />\n            ) : (\n              <Avatar name={props.person.name} className=\"size-16 text-kh-heading\" />\n            )}\n            <div className=\"min-w-0\">\n              <Text path={['person', 'name']} value={props.person.name} as=\"p\" className=\"text-kh-body font-semibold\" />\n              <Opt path={['person', 'role']} value={props.person.role} as=\"p\" className=\"text-kh-small text-kh-muted\" placeholder=\"Role\" />\n            </div>\n          </div>\n          <p className=\"mt-5 flex items-center gap-2 text-kh-small text-kh-muted\">\n            <Clock aria-hidden className=\"size-4 shrink-0\" />\n            <Text path={['lengthLabel']} value={props.lengthLabel} as=\"span\" />\n            <Text path={['length']} value={props.length} as=\"span\" className=\"font-medium text-kh-ink\" />\n          </p>\n          <Text path={['whatTitle']} value={props.whatTitle} as=\"h3\" className=\"mt-8 text-kh-heading font-semibold\" />\n          <ul className=\"mt-3 flex flex-col gap-2.5\">\n            {props.points.map((p, i) => (\n              <li key={i} className=\"flex gap-3 text-kh-body\">\n                <span aria-hidden className=\"mt-2.5 size-1.5 shrink-0 rounded-kh-pill bg-kh-accent\" />\n                <Text path={['points', i]} value={p} as=\"span\" />\n              </li>\n            ))}\n          </ul>\n          <div className=\"mt-8\">\n            <ButtonLink href={props.link.href} size=\"lg\" icon={<CalendarDays aria-hidden className=\"size-4\" />} {...out}>\n              <Text path={['link', 'label']} value={props.link.label} as=\"span\" />\n            </ButtonLink>\n          </div>\n          {props.alt && (props.alt.email || editing) && (\n            <p className=\"mt-5 text-kh-small text-kh-muted\">\n              <Text path={['alt', 'label']} value={props.alt.label} as=\"span\" />{' '}\n              <TextLink href={`mailto:${props.alt.email}`}>\n                <Text path={['alt', 'email']} value={props.alt.email} as=\"span\" />\n              </TextLink>\n            </p>\n          )}\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ContactBookingLink);\n"
    }
  ]
}
