{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "event101",
  "title": "Slot By Slot Day Builder",
  "description": "A programme picker that builds the day beside the questions: one choice per time slot drops a session card with its room, its length, and its photograph into a running plan, and the hours left open stay on the page instead of being hidden.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "questionnaire",
    "button"
  ],
  "files": [
    {
      "path": "registry/event101/event101.tsx",
      "content": "\"use client\";\n\nimport { Check, RotateCcw } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { type ChangeEvent, type FormEvent, useState } from \"react\";\nimport { Badge23 } from \"@/components/beste/component/badge23\";\nimport { Button21 } from \"@/components/beste/component/button21\";\nimport {\n  Questionnaire,\n  QuestionnaireActions,\n  QuestionnaireChoice,\n  QuestionnaireChoiceDescription,\n  QuestionnaireChoices,\n  QuestionnaireDescription,\n  QuestionnaireError,\n  QuestionnaireItem,\n  QuestionnaireNext,\n  QuestionnairePrevious,\n  QuestionnaireProgress,\n  QuestionnaireSubmit,\n  QuestionnaireTitle,\n} from \"@/components/ui/questionnaire\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Badge {\n  label: string;\n}\n\ninterface ActionLink {\n  label: string;\n  href: string;\n}\n\ninterface SessionImage {\n  src: string;\n  alt: string;\n}\n\ninterface SessionChoice {\n  value: string;\n  label: string;\n  description?: string;\n  /** Where it happens, printed in the plan */\n  room: string;\n  /** Length in whole minutes. Summed into the day's total. */\n  minutes: number;\n  image?: SessionImage;\n}\n\ninterface SlotQuestion {\n  /** Form field name. Must be unique across the day. */\n  name: string;\n  /** Start time, printed down the left of the plan */\n  time: string;\n  title: string;\n  description?: string;\n  choices?: SessionChoice[];\n}\n\ninterface Confirmation {\n  title: string;\n  description: string;\n}\n\ninterface Event101Labels {\n  previous?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n  planTitle?: string;\n  emptyLabel?: string;\n  totalLabel?: string;\n  hour?: string;\n  minute?: string;\n}\n\ninterface Event101Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  /** One question per slot, in the order the day runs */\n  slots?: SlotQuestion[];\n  /** Prints a scoped shortcut on every choice and binds it while the slot is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** Replaces the questions once the day is confirmed */\n  confirmation?: Confirmation;\n  button?: ActionLink;\n  labels?: Event101Labels;\n  className?: string;\n}\n\n/** \"2 hr 40 min\", without a locale API that can drift between server and client. */\nfunction formatMinutes(total: number, hour: string, minute: string) {\n  const hours = Math.floor(total / 60);\n  const rest = total % 60;\n  if (hours === 0) return `${rest} ${minute}`;\n  if (rest === 0) return `${hours} ${hour}`;\n  return `${hours} ${hour} ${rest} ${minute}`;\n}\n\nexport const event101Demo: Event101Props = {\n  badge: { label: \"Build your day\" },\n  heading: \"Four slots, and you can see the gaps you leave\",\n  description:\n    \"The programme is not a list of everything happening at once. Pick one thing per slot and the day fills in beside you, including the hours you decided to keep empty.\",\n  shortcuts: \"numbers\",\n  labels: {\n    submit: \"Save this day\",\n    restart: \"Plan it again\",\n    planTitle: \"Your day\",\n    emptyLabel: \"Nothing booked yet\",\n    totalLabel: \"booked\",\n    hour: \"hr\",\n    minute: \"min\",\n  },\n  confirmation: {\n    title: \"Day saved\",\n    description:\n      \"It is in your calendar with the room numbers attached. Swap anything up to the morning of, and the rooms follow the change.\",\n  },\n  button: { label: \"Add it to my calendar\", href: \"https://beste.co\" },\n  slots: [\n    {\n      name: \"morning\",\n      time: \"09:30\",\n      title: \"How do you want to start?\",\n      description: \"The room fills up, so this is the one worth deciding early.\",\n      choices: [\n        {\n          value: \"keynote\",\n          label: \"The opening talk\",\n          description: \"One hour, one argument, no slides worth photographing.\",\n          room: \"Main hall\",\n          minutes: 60,\n          image: {\n            src: \"https://images.unsplash.com/photo-1587825140708-dfaf72ae4b04?w=800&h=600&fit=crop\",\n            alt: \"A speaker alone on a round stage with the audience seated around it\",\n          },\n        },\n        {\n          value: \"workshop\",\n          label: \"Hands on the tools\",\n          description: \"Bring a laptop. You will build something small and break it twice.\",\n          room: \"Studio 2\",\n          minutes: 90,\n          image: {\n            src: \"https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=800&h=600&fit=crop\",\n            alt: \"Three people working at a table with their laptops open\",\n          },\n        },\n      ],\n    },\n    {\n      name: \"midday\",\n      time: \"11:30\",\n      title: \"And before lunch?\",\n      choices: [\n        {\n          value: \"panel\",\n          label: \"The disagreement panel\",\n          description: \"Four people who genuinely do not agree, moderated firmly.\",\n          room: \"Main hall\",\n          minutes: 45,\n          image: {\n            src: \"https://images.unsplash.com/photo-1591115765373-5207764f72e7?w=800&h=600&fit=crop\",\n            alt: \"A speaker taking questions from a seated group in a brick-walled room\",\n          },\n        },\n        {\n          value: \"clinic\",\n          label: \"Bring your problem\",\n          description: \"Fifteen minutes with somebody who has solved it before.\",\n          room: \"Room 4\",\n          minutes: 30,\n          image: {\n            src: \"https://images.unsplash.com/photo-1543269865-cbf427effbad?w=800&h=600&fit=crop\",\n            alt: \"Four people talking around a small table\",\n          },\n        },\n      ],\n    },\n    {\n      name: \"afternoon\",\n      time: \"14:00\",\n      title: \"The afternoon is the quiet one.\",\n      description: \"Most people fade here. Pick accordingly.\",\n      choices: [\n        {\n          value: \"case\",\n          label: \"A case study, told honestly\",\n          description: \"Including the eighteen months where it did not work.\",\n          room: \"Studio 1\",\n          minutes: 45,\n          image: {\n            src: \"https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&h=600&fit=crop\",\n            alt: \"A presenter at a wall of notes with a group seated at the table\",\n          },\n        },\n        {\n          value: \"walk\",\n          label: \"The walking session\",\n          description: \"Outside, in a group of eight, no screens.\",\n          room: \"Meet at reception\",\n          minutes: 60,\n          image: {\n            src: \"https://images.unsplash.com/photo-1509316975850-ff9c5deb0cd9?w=800&h=600&fit=crop\",\n            alt: \"Pine forest along the walking route\",\n          },\n        },\n      ],\n    },\n    {\n      name: \"close\",\n      time: \"16:30\",\n      title: \"How does it end?\",\n      choices: [\n        {\n          value: \"closing\",\n          label: \"The closing talk\",\n          description: \"Thirty minutes, and it does try to tie the day together.\",\n          room: \"Main hall\",\n          minutes: 30,\n          image: {\n            src: \"https://images.unsplash.com/photo-1587825140708-dfaf72ae4b04?w=800&h=600&fit=crop\",\n            alt: \"A speaker alone on a round stage with the audience seated around it\",\n          },\n        },\n        {\n          value: \"drinks\",\n          label: \"Straight to the bar\",\n          description: \"The honest option, and the one where the useful talking happens.\",\n          room: \"Courtyard\",\n          minutes: 90,\n          image: {\n            src: \"https://images.unsplash.com/photo-1517457373958-b7bdd4587205?w=800&h=600&fit=crop\",\n            alt: \"An evening gathering outdoors under string lights\",\n          },\n        },\n      ],\n    },\n  ],\n};\n\nexport function Event101({\n  badge,\n  heading,\n  description,\n  slots = [],\n  shortcuts,\n  confirmation,\n  button,\n  labels = {},\n  className,\n}: Event101Props) {\n  const {\n    previous: previousLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n    planTitle,\n    emptyLabel,\n    totalLabel,\n    hour,\n    minute,\n  } = labels;\n\n  const [picked, setPicked] = useState<Record<string, string>>({});\n  const [saved, setSaved] = useState(false);\n\n  const chosen = (slot: SlotQuestion) =>\n    slot.choices?.find((choice) => choice.value === picked[slot.name]);\n\n  const booked = slots.filter((slot) => chosen(slot));\n  const total = booked.reduce((sum, slot) => sum + (chosen(slot)?.minutes ?? 0), 0);\n\n  const record = (slot: SlotQuestion, value: string) => (event: ChangeEvent<HTMLInputElement>) => {\n    if (!event.target.checked) return;\n    setSaved(false);\n    setPicked((previous) => ({ ...previous, [slot.name]: value }));\n  };\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    setSaved(true);\n  };\n\n  const restart = () => {\n    setPicked({});\n    setSaved(false);\n  };\n\n  return (\n    <section className={cn(\"w-full bg-background py-16 md:py-24\", className)}>\n      <div className=\"mx-auto max-w-7xl px-4 md:px-6\">\n        {badge && <Badge23 label={badge.label} />}\n\n        <div className=\"mt-6 border-t border-border pt-8 md:pt-10\">\n          <div className=\"grid gap-6 md:grid-cols-2 md:gap-12\">\n            {heading && (\n              <h2 className=\"text-3xl font-light leading-[1.1] tracking-tight text-foreground md:text-5xl\">\n                {heading}\n              </h2>\n            )}\n            {description && (\n              <div className=\"flex md:justify-end\">\n                <p className=\"max-w-md text-base leading-relaxed text-muted-foreground\">\n                  {description}\n                </p>\n              </div>\n            )}\n          </div>\n        </div>\n\n        <div className=\"mt-12 grid gap-8 md:mt-16 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)] lg:gap-12\">\n          <div>\n            {saved && confirmation ? (\n              <>\n                <span className=\"flex size-10 items-center justify-center rounded-full bg-primary text-primary-foreground\">\n                  <Check className=\"size-5\" aria-hidden=\"true\" />\n                </span>\n                <p className=\"mt-5 text-2xl font-light tracking-tight text-foreground md:text-3xl\">\n                  {confirmation.title}\n                </p>\n                <p className=\"mt-4 text-base leading-relaxed text-muted-foreground\">\n                  {confirmation.description}\n                </p>\n\n                <div className=\"mt-8 flex flex-wrap items-center gap-3\">\n                  {button && (\n                    <Button21 asChild label={button.label}>\n                      <Link href={button.href} />\n                    </Button21>\n                  )}\n                  <Button21\n                    label={restartLabel ?? \"Plan it again\"}\n                    tone=\"outline\"\n                    icon={RotateCcw}\n                    onClick={restart}\n                  />\n                </div>\n              </>\n            ) : (\n              <Questionnaire\n                defaultItem={slots[0]?.name}\n                shortcuts={shortcuts}\n                onSubmit={handleSubmit}\n                className=\"gap-6\"\n              >\n                {slots.length > 0 && (\n                  <QuestionnaireProgress className=\"text-sm font-normal tracking-normal\" />\n                )}\n\n                {slots.map((slot, index) => (\n                  <QuestionnaireItem key={index} name={slot.name} required>\n                    <QuestionnaireTitle className=\"text-xl font-medium text-foreground\">\n                      {slot.title}\n                    </QuestionnaireTitle>\n                    {slot.description && (\n                      <QuestionnaireDescription className=\"text-base leading-relaxed\">\n                        {slot.description}\n                      </QuestionnaireDescription>\n                    )}\n                    <QuestionnaireChoices>\n                      {slot.choices?.map((choice, choiceIndex) => (\n                        <QuestionnaireChoice\n                          key={choiceIndex}\n                          value={choice.value}\n                          onChange={record(slot, choice.value)}\n                          className=\"rounded-md border-border p-4 text-base\"\n                        >\n                          <span className=\"font-medium text-foreground\">{choice.label}</span>\n                          {choice.description && (\n                            <QuestionnaireChoiceDescription className=\"text-sm\">\n                              {choice.description}\n                            </QuestionnaireChoiceDescription>\n                          )}\n                        </QuestionnaireChoice>\n                      ))}\n                    </QuestionnaireChoices>\n                    <QuestionnaireError className=\"text-sm\" />\n                  </QuestionnaireItem>\n                ))}\n\n                <QuestionnaireActions>\n                  <QuestionnairePrevious className=\"cursor-pointer rounded-md border-border text-sm font-medium\">\n                    {previousLabel}\n                  </QuestionnairePrevious>\n                  <QuestionnaireNext className=\"cursor-pointer rounded-md bg-primary text-sm font-medium text-primary-foreground hover:bg-primary/90\">\n                    {nextLabel}\n                  </QuestionnaireNext>\n                  <QuestionnaireSubmit className=\"cursor-pointer rounded-md bg-primary text-sm font-medium text-primary-foreground hover:bg-primary/90\">\n                    {submitLabel}\n                  </QuestionnaireSubmit>\n                </QuestionnaireActions>\n              </Questionnaire>\n            )}\n          </div>\n\n          <div>\n            <div className=\"flex flex-wrap items-baseline justify-between gap-4\">\n              {planTitle && <p className=\"text-sm text-muted-foreground\">{planTitle}</p>}\n              <p className=\"text-sm text-muted-foreground\">\n                <span className=\"text-primary\">\n                  {booked.length} of {slots.length}\n                </span>{\" \"}\n                {totalLabel ?? \"booked\"}\n                {total > 0 && (\n                  <span className=\"tabular-nums\">\n                    , {formatMinutes(total, hour ?? \"hr\", minute ?? \"min\")}\n                  </span>\n                )}\n              </p>\n            </div>\n\n            <div className=\"mt-5\">\n              {slots.map((slot, index) => {\n                const session = chosen(slot);\n                return (\n                  <div\n                    key={index}\n                    className=\"flex gap-5 border-b border-border py-5 first:border-t md:gap-8\"\n                  >\n                    <div className=\"flex w-16 shrink-0 items-start gap-3 md:w-20\">\n                      <span\n                        aria-hidden=\"true\"\n                        className={cn(\n                          \"mt-2 size-2 shrink-0 rounded-full\",\n                          session ? \"bg-primary\" : \"bg-border\"\n                        )}\n                      />\n                      <span className=\"text-base tabular-nums text-foreground\">{slot.time}</span>\n                    </div>\n\n                    {session ? (\n                      <div className=\"flex min-w-0 flex-1 items-start gap-4\">\n                        {session.image && (\n                          <img\n                            className=\"size-16 shrink-0 rounded-md object-cover md:size-20\"\n                            src={session.image.src}\n                            alt={session.image.alt}\n                          />\n                        )}\n                        <div className=\"min-w-0 flex-1\">\n                          <p className=\"text-lg font-medium text-foreground\">{session.label}</p>\n                          <p className=\"mt-1 text-sm text-muted-foreground\">\n                            {session.room}\n                            {\", \"}\n                            <span className=\"tabular-nums\">\n                              {formatMinutes(session.minutes, hour ?? \"hr\", minute ?? \"min\")}\n                            </span>\n                          </p>\n                          {session.description && (\n                            <p className=\"mt-2 text-sm leading-relaxed text-muted-foreground\">\n                              {session.description}\n                            </p>\n                          )}\n                        </div>\n                      </div>\n                    ) : (\n                      <div className=\"flex min-w-0 flex-1 items-center\">\n                        <p className=\"text-base text-muted-foreground\">\n                          {emptyLabel ?? \"Nothing booked yet\"}\n                        </p>\n                      </div>\n                    )}\n                  </div>\n                );\n              })}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/event101.tsx"
    },
    {
      "path": "registry-components/badge23/badge23.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"muted\" | \"foreground\" | \"primary\";\n\ninterface Badge23Props {\n  /** Eyebrow label */\n  label: string;\n  /** Text/border tone */\n  tone?: Tone;\n  /** Additional classes merged onto the root */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  muted: \"border-border text-muted-foreground\",\n  foreground: \"border-foreground/30 text-foreground\",\n  primary: \"border-primary/40 text-primary\",\n};\n\nexport const badge23Demo: Badge23Props = {\n  label: \"Product\",\n};\n\nexport function Badge23({ label, tone = \"muted\", className }: Badge23Props) {\n  return (\n    <span\n      className={cn(\n        \"inline-flex items-center rounded-md border bg-transparent px-2.5 py-1 text-sm font-medium leading-none\",\n        toneStyles[tone],\n        className\n      )}\n    >\n      {label}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/badge23.tsx"
    },
    {
      "path": "registry-components/button21/button21.tsx",
      "content": "\"use client\";\n\nimport type { LucideIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"primary\" | \"neutral\" | \"outline\";\n\ninterface Button21Props {\n  /** Button label */\n  label: string;\n  /**\n   * Compose the rendered element shadcn-style (radix asChild): your element\n   * (e.g. a router Link) becomes the root and the button content is injected\n   * as its children. Pass the element without children of its own.\n   */\n  asChild?: boolean;\n  /** The element to render when `asChild` is set (e.g. your framework's Link) */\n  children?: React.ReactElement;\n  /**\n   * Fallback link: renders a plain `<a>`. Prefer `asChild` with your\n   * framework's Link component for client-side navigation.\n   */\n  href?: string;\n  /** Optional trailing icon */\n  icon?: LucideIcon;\n  /** Surface tone: solid accent (default), soft neutral pill, or hairline outline */\n  tone?: Tone;\n  /** Click handler (used when there is no href and no asChild) */\n  onClick?: React.MouseEventHandler<HTMLButtonElement>;\n  /** Additional classes merged onto the button */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  primary: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n  neutral: \"bg-muted text-foreground hover:bg-muted/70\",\n  outline: \"border border-border bg-transparent text-foreground hover:bg-muted\",\n};\n\nexport const button21Demo: Button21Props = {\n  label: \"Book a demo\",\n};\n\nexport function Button21({\n  label,\n  asChild = false,\n  children,\n  href,\n  icon: Icon,\n  tone = \"primary\",\n  onClick,\n  className,\n}: Button21Props) {\n  const classes = cn(\n    \"group/button21 h-auto w-fit gap-2 rounded-md px-5 py-2.5 text-sm font-medium tracking-tight transition-colors\",\n    toneStyles[tone],\n    className\n  );\n\n  const inner = (\n    <>\n      {label}\n      {Icon && (\n        <Icon className=\"size-4 transition-transform motion-safe:group-hover/button21:translate-x-0.5\" />\n      )}\n    </>\n  );\n\n  if (asChild && React.isValidElement(children)) {\n    return (\n      <Button asChild className={classes}>\n        {React.cloneElement(children, undefined, inner)}\n      </Button>\n    );\n  }\n\n  if (href) {\n    return (\n      <Button asChild className={classes}>\n        <a href={href}>{inner}</a>\n      </Button>\n    );\n  }\n\n  return (\n    <Button type=\"button\" className={classes} onClick={onClick}>\n      {inner}\n    </Button>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/button21.tsx"
    }
  ],
  "type": "registry:block"
}