{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "fitness40",
  "title": "Honest Programme Match",
  "description": "A programme finder that argues with you: three questions land on one training block, and the card overlapping the photographic band answers in two columns, who it is for beside who should not take it, before the practical facts.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "questionnaire",
    "button"
  ],
  "files": [
    {
      "path": "registry/fitness40/fitness40.tsx",
      "content": "\"use client\";\n\nimport { Check, Minus, RotateCcw } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { 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 BandImage {\n  src: string;\n  alt: string;\n}\n\ninterface Fact {\n  label: string;\n  value: string;\n}\n\ninterface IntakeChoice {\n  value: string;\n  label: string;\n  description?: string;\n}\n\ninterface IntakeQuestion {\n  /** Form field name. Must be unique across the flow. */\n  name: string;\n  title: string;\n  description?: string;\n  choices?: IntakeChoice[];\n}\n\ninterface Programme {\n  /**\n   * Field name to answer value. A programme is only matched when every pair\n   * fits. Leave it out on the last one, which is the catch-all.\n   */\n  match?: Record<string, string>;\n  title: string;\n  summary: string;\n  /** Replaces the standing band once this programme is matched */\n  image?: BandImage;\n  caption?: string;\n  /** The honest half: who this is for */\n  suits?: string[];\n  /** The other honest half: who should not take it */\n  avoid?: string[];\n  facts?: Fact[];\n  button?: ActionLink;\n}\n\ninterface Fitness40Labels {\n  previous?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n  matchTitle?: string;\n  suitsTitle?: string;\n  avoidTitle?: string;\n}\n\ninterface Fitness40Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  /** Standing band, shown until a programme is matched */\n  image?: BandImage;\n  caption?: string;\n  questions?: IntakeQuestion[];\n  /** Prints a scoped shortcut on every choice and binds it while the question is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** Checked in order; the first one whose `match` fits the answers wins. */\n  programmes?: Programme[];\n  labels?: Fitness40Labels;\n  className?: string;\n}\n\nexport const fitness40Demo: Fitness40Props = {\n  badge: { label: \"Find your programme\" },\n  heading: \"Three questions, and one of them we will talk you out of\",\n  description:\n    \"Every programme here says who it is not for. That list is longer than the other one, and it is the reason people finish these instead of quitting in week three.\",\n  shortcuts: \"numbers\",\n  image: {\n    src: \"https://images.unsplash.com/photo-1741722604274-cb1da5e87ebd?q=80&w=3167&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n    alt: \"Empty gym floor in morning light\",\n  },\n  caption: \"One room, four coaches, and nobody filming themselves.\",\n  labels: {\n    submit: \"Show me the programme\",\n    restart: \"Answer again\",\n    matchTitle: \"Closest programme\",\n    suitsTitle: \"Take this if\",\n    avoidTitle: \"Do not take this if\",\n  },\n  questions: [\n    {\n      name: \"now\",\n      title: \"Where are you starting from?\",\n      description: \"Honestly. The wrong answer here is the one that hurts in week two.\",\n      choices: [\n        {\n          value: \"none\",\n          label: \"Nothing for a year or more\",\n          description: \"Walking counts, but that is where it stops.\",\n        },\n        {\n          value: \"some\",\n          label: \"On and off\",\n          description: \"A good month, then three weeks of nothing.\",\n        },\n        {\n          value: \"regular\",\n          label: \"Already training weekly\",\n          description: \"It is in the calendar and it mostly happens.\",\n        },\n      ],\n    },\n    {\n      name: \"time\",\n      title: \"How many mornings can you actually give it?\",\n      choices: [\n        { value: \"two\", label: \"Two\" },\n        { value: \"three\", label: \"Three\" },\n        { value: \"four\", label: \"Four or more\" },\n      ],\n    },\n    {\n      name: \"goal\",\n      title: \"What would make this worth doing?\",\n      choices: [\n        { value: \"strength\", label: \"Being stronger than I am\" },\n        { value: \"stamina\", label: \"Not being out of breath\" },\n        { value: \"normal\", label: \"Feeling like myself again\" },\n      ],\n    },\n  ],\n  programmes: [\n    {\n      match: { now: \"none\" },\n      title: \"Return, eight weeks\",\n      summary:\n        \"Two sessions a week, both supervised, and deliberately easier than you want them to be. The point is to still be here in March.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=1600&h=900&fit=crop\",\n        alt: \"Coach setting up equipment in a quiet gym\",\n      },\n      caption: \"Return groups are capped at six, which is why they book out first.\",\n      suits: [\n        \"You have not trained in a year and would rather not be the worst person in the room\",\n        \"You want somebody watching the first six weeks of movement\",\n        \"Two mornings is what you can genuinely protect\",\n      ],\n      avoid: [\n        \"You are chasing a number by a fixed date\",\n        \"You already train and want to add volume, not rebuild it\",\n        \"You would find a capped, supervised group patronising\",\n      ],\n      facts: [\n        { label: \"Sessions\", value: \"Two a week, 50 minutes\" },\n        { label: \"Group size\", value: \"Six people\" },\n        { label: \"Starts\", value: \"First Monday of the month\" },\n      ],\n      button: { label: \"See the eight week plan\", href: \"https://beste.co\" },\n    },\n    {\n      match: { goal: \"strength\" },\n      title: \"Strength, three mornings\",\n      summary:\n        \"A barbell programme with the boring parts left in. Progress is slow, written down, and checked against the last block rather than against anyone else.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1518611012118-696072aa579a?w=1600&h=900&fit=crop\",\n        alt: \"Loaded barbell resting on a gym floor\",\n      },\n      caption: \"Everything on this programme is logged, including the sessions that go badly.\",\n      suits: [\n        \"You can hold three mornings a week for at least twelve weeks\",\n        \"You want a number to go up and are willing to be patient about it\",\n        \"You are comfortable being coached on technique in front of other people\",\n      ],\n      avoid: [\n        \"You are coming back from a long gap with no supervision\",\n        \"You want variety more than you want progress\",\n        \"Three mornings is optimistic rather than true\",\n      ],\n      facts: [\n        { label: \"Sessions\", value: \"Three a week, 70 minutes\" },\n        { label: \"Block length\", value: \"Twelve weeks\" },\n        { label: \"Reviewed\", value: \"Every fourth week\" },\n      ],\n      button: { label: \"See the strength block\", href: \"https://beste.co\" },\n    },\n    {\n      match: { goal: \"stamina\" },\n      title: \"Endurance, rolling\",\n      summary:\n        \"Mostly easy running and cycling with one hard session a week. It works because the easy parts are genuinely easy, which most people find harder than the hard part.\",\n      suits: [\n        \"You want to stop being out of breath on ordinary days\",\n        \"You can do most of the work outside, alone, without being chased\",\n        \"You are willing to go slower than feels productive\",\n      ],\n      avoid: [\n        \"You need company to get out of the door\",\n        \"You want visible change in six weeks\",\n        \"One hard session a week sounds like too little\",\n      ],\n      facts: [\n        { label: \"Sessions\", value: \"Three to five, mostly easy\" },\n        { label: \"Check-in\", value: \"Fortnightly, fifteen minutes\" },\n        { label: \"Starts\", value: \"Any Monday\" },\n      ],\n      button: { label: \"See the endurance plan\", href: \"https://beste.co\" },\n    },\n    {\n      title: \"General, two mornings\",\n      summary:\n        \"The unglamorous one. Mixed sessions, no target, and the only measure is whether you are still coming in three months.\",\n      suits: [\n        \"You want to train without signing up to a goal\",\n        \"Two mornings a week suits your life and you would like to keep it that way\",\n        \"You would rather be told what to do when you arrive\",\n      ],\n      avoid: [\n        \"You have a date and a number in mind\",\n        \"You want a programme you can follow on your own\",\n        \"You find mixed groups distracting\",\n      ],\n      facts: [\n        { label: \"Sessions\", value: \"Two a week, 45 minutes\" },\n        { label: \"Group size\", value: \"Ten people\" },\n        { label: \"Starts\", value: \"Any week\" },\n      ],\n      button: { label: \"See what a week looks like\", href: \"https://beste.co\" },\n    },\n  ],\n};\n\nexport function Fitness40({\n  badge,\n  heading,\n  description,\n  image,\n  caption,\n  questions = [],\n  shortcuts,\n  programmes = [],\n  labels = {},\n  className,\n}: Fitness40Props) {\n  const {\n    previous: previousLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n    matchTitle,\n    suitsTitle,\n    avoidTitle,\n  } = labels;\n\n  const [programme, setProgramme] = useState<Programme | null>(null);\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n    const given: Record<string, string> = {};\n    for (const question of questions) {\n      given[question.name] = String(data.get(question.name) ?? \"\");\n    }\n\n    // The last programme stands in when nothing fits, so a submit never dead-ends.\n    const matched = programmes.find((entry) =>\n      Object.entries(entry.match ?? {}).every(([name, value]) => given[name] === value)\n    );\n    setProgramme(matched ?? programmes[programmes.length - 1] ?? null);\n  };\n\n  const restart = () => setProgramme(null);\n\n  const shownImage = programme?.image ?? image;\n  const shownCaption = programme?.caption ?? caption;\n\n  return (\n    <section className={cn(\"w-full bg-background py-16 md:py-24\", className)}>\n      <div className=\"mx-auto max-w-6xl 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=\"relative mt-12 h-72 overflow-hidden rounded-md bg-muted md:mt-16 md:h-96\">\n          {shownImage && (\n            <img\n              className=\"absolute inset-0 size-full object-cover\"\n              src={shownImage.src}\n              alt={shownImage.alt}\n            />\n          )}\n          <div className=\"absolute inset-0 bg-gradient-to-t from-foreground/70 via-foreground/10 to-transparent\" />\n        </div>\n\n        <div className=\"relative z-10 mx-auto -mt-12 max-w-3xl rounded-md border border-border bg-background p-6 md:p-10\">\n          {programme ? (\n            <>\n              {matchTitle && <p className=\"text-sm text-muted-foreground\">{matchTitle}</p>}\n              <p className=\"mt-3 text-2xl font-light tracking-tight text-foreground md:text-4xl\">\n                {programme.title}\n              </p>\n              <p className=\"mt-4 text-base leading-relaxed text-muted-foreground\">\n                {programme.summary}\n              </p>\n\n              <div className=\"mt-10 grid gap-8 md:grid-cols-2 md:gap-12\">\n                <div>\n                  <p className=\"text-lg font-medium text-foreground\">\n                    {suitsTitle ?? \"Take this if\"}\n                  </p>\n                  <ul className=\"mt-4\">\n                    {programme.suits?.map((line, index) => (\n                      <li\n                        key={index}\n                        className=\"flex gap-3 border-t border-border py-4\"\n                      >\n                        <Check\n                          className=\"mt-0.5 size-4 shrink-0 text-primary\"\n                          aria-hidden=\"true\"\n                        />\n                        <span className=\"text-base leading-relaxed text-foreground\">{line}</span>\n                      </li>\n                    ))}\n                  </ul>\n                </div>\n\n                <div>\n                  <p className=\"text-lg font-medium text-foreground\">\n                    {avoidTitle ?? \"Do not take this if\"}\n                  </p>\n                  <ul className=\"mt-4\">\n                    {programme.avoid?.map((line, index) => (\n                      <li\n                        key={index}\n                        className=\"flex gap-3 border-t border-border py-4\"\n                      >\n                        <Minus\n                          className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\"\n                          aria-hidden=\"true\"\n                        />\n                        <span className=\"text-base leading-relaxed text-muted-foreground\">\n                          {line}\n                        </span>\n                      </li>\n                    ))}\n                  </ul>\n                </div>\n              </div>\n\n              {programme.facts && programme.facts.length > 0 && (\n                <dl className=\"mt-10 grid gap-6 sm:grid-cols-3\">\n                  {programme.facts.map((fact, index) => (\n                    <div key={index} className=\"border-t border-border pt-4\">\n                      <dt className=\"text-sm text-muted-foreground\">{fact.label}</dt>\n                      <dd className=\"mt-2 text-base text-foreground\">{fact.value}</dd>\n                    </div>\n                  ))}\n                </dl>\n              )}\n\n              <div className=\"mt-10 flex flex-wrap items-center gap-3\">\n                {programme.button && (\n                  <Button21 asChild label={programme.button.label}>\n                    <Link href={programme.button.href} />\n                  </Button21>\n                )}\n                <Button21\n                  label={restartLabel ?? \"Answer again\"}\n                  tone=\"outline\"\n                  icon={RotateCcw}\n                  onClick={restart}\n                />\n              </div>\n            </>\n          ) : (\n            <Questionnaire\n              defaultItem={questions[0]?.name}\n              shortcuts={shortcuts}\n              onSubmit={handleSubmit}\n              className=\"gap-6\"\n            >\n              {questions.length > 0 && (\n                <QuestionnaireProgress className=\"text-sm font-normal tracking-normal\" />\n              )}\n\n              {questions.map((question, index) => (\n                <QuestionnaireItem key={index} name={question.name} required>\n                  <QuestionnaireTitle className=\"text-xl font-medium text-foreground\">\n                    {question.title}\n                  </QuestionnaireTitle>\n                  {question.description && (\n                    <QuestionnaireDescription className=\"text-base leading-relaxed\">\n                      {question.description}\n                    </QuestionnaireDescription>\n                  )}\n                  <QuestionnaireChoices>\n                    {question.choices?.map((choice, choiceIndex) => (\n                      <QuestionnaireChoice\n                        key={choiceIndex}\n                        value={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        {shownCaption && (\n          <p className=\"mt-6 text-center text-sm text-muted-foreground\">{shownCaption}</p>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/fitness40.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"
}