{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "agency24",
  "title": "Studio Brief With Changing Plate",
  "description": "A four-step studio brief where the tall photograph beside it changes with the question on screen, each with its own caption, and sending the brief swaps the plate for the studio and the form for a ledger of the answers.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react",
    "@radix-ui/react-slot"
  ],
  "registryDependencies": [
    "questionnaire"
  ],
  "files": [
    {
      "path": "registry/agency24/agency24.tsx",
      "content": "\"use client\";\n\nimport Link from \"next/link\";\nimport { type FormEvent, useState } from \"react\";\nimport { Badge7 } from \"@/components/beste/component/badge7\";\nimport { Button12 } from \"@/components/beste/component/button12\";\nimport {\n  Questionnaire,\n  QuestionnaireActions,\n  QuestionnaireChoice,\n  QuestionnaireChoiceDescription,\n  QuestionnaireChoices,\n  QuestionnaireDescription,\n  QuestionnaireError,\n  QuestionnaireInput,\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 ActionButton {\n  label: string;\n  href: string;\n}\n\ninterface BriefImage {\n  src: string;\n  alt: string;\n}\n\ninterface BriefChoice {\n  value: string;\n  label: string;\n  description?: string;\n}\n\ninterface BriefStep {\n  /** Form field name. Must be unique across the brief. */\n  name: string;\n  title: string;\n  description?: string;\n  choices?: BriefChoice[];\n  /** Free-text field rendered under the fixed choices, or on its own */\n  input?: { label: string; placeholder?: string; type?: \"email\" | \"text\" };\n  /** Blocks Next until the step is answered */\n  required?: boolean;\n  /** Renders the choices as checkboxes instead of radios */\n  multiple?: boolean;\n  /** Shown in the panel while this step is the one on screen */\n  image: BriefImage;\n  /** Line under the panel while this step is the one on screen */\n  caption: string;\n}\n\ninterface Closing {\n  image: BriefImage;\n  caption: string;\n  title: string;\n  description: string;\n  /** Stands in for a step that was left blank */\n  emptyLabel?: string;\n}\n\ninterface Note {\n  title: string;\n  description: string;\n}\n\ninterface Agency24Labels {\n  previous?: string;\n  next?: string;\n  submit?: string;\n  restart?: string;\n}\n\ninterface Agency24Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  steps?: BriefStep[];\n  /** Prints a scoped shortcut on every choice and binds it while the step is active */\n  shortcuts?: \"letters\" | \"numbers\";\n  /** The panel and the ledger shown once the brief is sent */\n  closing?: Closing;\n  button?: ActionButton;\n  /** Ruled row under the brief */\n  notes?: Note[];\n  labels?: Agency24Labels;\n  className?: string;\n}\n\nexport const agency24Demo: Agency24Props = {\n  badge: { label: \"Start a brief\" },\n  heading: \"Four answers and we know whether we are the wrong studio for you.\",\n  description:\n    \"This is the same set of questions we would ask on a first call, asked in the order that actually decides anything.\",\n  shortcuts: \"numbers\",\n  labels: { submit: \"Send the brief\", restart: \"Write a different one\" },\n  steps: [\n    {\n      name: \"work\",\n      title: \"What are we making?\",\n      description: \"Pick the centre of gravity. The rest tends to follow it.\",\n      required: true,\n      choices: [\n        {\n          value: \"identity\",\n          label: \"An identity\",\n          description: \"A name, a mark, and the rules that keep it upright.\",\n        },\n        {\n          value: \"site\",\n          label: \"A site\",\n          description: \"Something people read, buy from, or sign up through.\",\n        },\n        {\n          value: \"campaign\",\n          label: \"A campaign\",\n          description: \"A launch with a date attached and nowhere to hide.\",\n        },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1583201173319-a4efa99605cf?q=80&w=1674&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Printed material laid out across a studio table\",\n      },\n      caption: \"Wordmark and print system for a small publisher, set over four weeks.\",\n    },\n    {\n      name: \"stage\",\n      title: \"Where is it now?\",\n      required: true,\n      choices: [\n        { value: \"blank\", label: \"Nothing exists yet\" },\n        { value: \"rebuild\", label: \"Something exists and it is tired\" },\n        { value: \"rescue\", label: \"Something exists and it is on fire\" },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1594100165806-939c3fbb5b6a?q=80&w=1747&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"A wall of pinned reference sheets in a working studio\",\n      },\n      caption: \"A rebuild usually starts as an audit, on a wall, in a single afternoon.\",\n    },\n    {\n      name: \"window\",\n      title: \"When does it have to be live?\",\n      description: \"A date you are held to, not the one you would prefer.\",\n      required: true,\n      choices: [\n        { value: \"weeks\", label: \"Inside six weeks\" },\n        { value: \"quarter\", label: \"This quarter\" },\n        { value: \"open\", label: \"No fixed date yet\" },\n      ],\n      image: {\n        src: \"https://images.unsplash.com/photo-1754390754756-16ee0e29cf36?q=80&w=1735&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Close view of a printed schedule beside a pen\",\n      },\n      caption: \"Six weeks is a real project. It just has fewer opinions in it.\",\n    },\n    {\n      name: \"contact\",\n      title: \"Where do we send the reply?\",\n      description: \"One person reads it. There is no queue behind this.\",\n      required: true,\n      input: { label: \"Email address\", placeholder: \"you@studio.com\", type: \"email\" },\n      image: {\n        src: \"https://images.unsplash.com/photo-1777523743687-233bbfdbd894?q=80&w=2075&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Two people talking across a studio desk\",\n      },\n      caption: \"Every brief gets a written answer, including the ones we turn down.\",\n    },\n  ],\n  closing: {\n    image: {\n      src: \"https://images.unsplash.com/photo-1763307411452-43cfd9f516ce?q=80&w=987&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n      alt: \"Studio interior with work pinned along one wall\",\n    },\n    caption: \"This is the room your brief lands in on Monday morning.\",\n    title: \"Brief received\",\n    description:\n      \"One of us replies inside two working days with either a plan or an honest reason we are not the studio for it.\",\n    emptyLabel: \"Left blank\",\n  },\n  button: { label: \"Book the intro call\", href: \"https://beste.co\" },\n  notes: [\n    {\n      title: \"No forms after this one\",\n      description:\n        \"The reply comes from the person who would run the work, not from an account manager collecting more answers.\",\n    },\n    {\n      title: \"We say no in writing\",\n      description:\n        \"If the date, the budget, or the shape of it is wrong for us, you get told why rather than ghosted.\",\n    },\n    {\n      title: \"The brief stays yours\",\n      description:\n        \"Nothing you write here is shown to anyone outside the studio, and we delete it if the work does not happen.\",\n    },\n  ],\n};\n\nexport function Agency24({\n  badge,\n  heading,\n  description,\n  steps = [],\n  shortcuts,\n  closing,\n  button,\n  notes = [],\n  labels = {},\n  className,\n}: Agency24Props) {\n  const {\n    previous: previousLabel,\n    next: nextLabel,\n    submit: submitLabel,\n    restart: restartLabel,\n  } = labels;\n\n  const [answers, setAnswers] = useState<Record<string, string[]> | null>(null);\n  /** Only observed: the panel beside the brief follows whichever step is on screen. */\n  const [activeName, setActiveName] = useState(steps[0]?.name);\n\n  const activeStep = steps.find((step) => step.name === activeName) ?? steps[0];\n  const panelImage = answers ? (closing?.image ?? activeStep?.image) : activeStep?.image;\n  const panelCaption = answers ? (closing?.caption ?? activeStep?.caption) : activeStep?.caption;\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n    const collected: Record<string, string[]> = {};\n    for (const step of steps) {\n      collected[step.name] = data\n        .getAll(step.name)\n        .map((entry) => String(entry).trim())\n        .filter((entry) => entry.length > 0);\n    }\n    setAnswers(collected);\n  };\n\n  const restart = () => {\n    setAnswers(null);\n    setActiveName(steps[0]?.name);\n  };\n\n  /** A stored value is a choice label first, and whatever was typed otherwise. */\n  const readable = (step: BriefStep, value: string) =>\n    step.choices?.find((choice) => choice.value === value)?.label ?? value;\n\n  return (\n    <section className={cn(\"w-full py-16 md:py-24\", className)}>\n      <div className=\"mx-auto max-w-7xl px-4 md:px-6\">\n        <div className=\"grid gap-8 md:grid-cols-[1.2fr_1fr] md:items-end md:gap-16\">\n          <div>\n            {badge && <Badge7 label={badge.label} />}\n            {heading && (\n              <h2 className=\"mt-6 max-w-2xl text-balance text-3xl font-bold leading-tight tracking-tight text-foreground md:text-4xl lg:text-5xl\">\n                {heading}\n              </h2>\n            )}\n          </div>\n          {description && (\n            <p className=\"max-w-md text-lg leading-relaxed text-muted-foreground md:text-xl\">\n              {description}\n            </p>\n          )}\n        </div>\n\n        <div className=\"mt-12 grid gap-10 md:mt-16 lg:grid-cols-2 lg:gap-16\">\n          <div>\n            <div className=\"relative h-96 overflow-hidden rounded-md bg-muted md:h-[34rem]\">\n              {panelImage && (\n                <img\n                  className=\"absolute inset-0 size-full object-cover\"\n                  src={panelImage.src}\n                  alt={panelImage.alt}\n                />\n              )}\n            </div>\n            {panelCaption && (\n              <p className=\"mt-6 text-lg leading-relaxed text-muted-foreground\">{panelCaption}</p>\n            )}\n          </div>\n\n          <div>\n            {answers && closing ? (\n              <>\n                <p className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                  {closing.title}\n                </p>\n                <p className=\"mt-3 text-lg leading-relaxed text-muted-foreground\">\n                  {closing.description}\n                </p>\n\n                <dl className=\"mt-8 flex flex-col\">\n                  {steps.map((step, index) => {\n                    const given = answers[step.name] ?? [];\n                    return (\n                      <div\n                        key={index}\n                        className=\"grid gap-1 border-t border-current/10 py-5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)] sm:gap-6\"\n                      >\n                        <dt className=\"text-base text-muted-foreground md:text-lg\">{step.title}</dt>\n                        <dd className=\"text-base font-bold break-words text-foreground md:text-lg\">\n                          {given.length > 0\n                            ? given.map((value) => readable(step, value)).join(\", \")\n                            : (closing.emptyLabel ?? \"Left blank\")}\n                        </dd>\n                      </div>\n                    );\n                  })}\n                </dl>\n\n                <div className=\"mt-8 flex flex-wrap items-center gap-4\">\n                  {button && (\n                    <Button12 asChild label={button.label}>\n                      <Link href={button.href} />\n                    </Button12>\n                  )}\n                  <button\n                    type=\"button\"\n                    onClick={restart}\n                    className=\"cursor-pointer text-base font-bold text-foreground underline underline-offset-4\"\n                  >\n                    {restartLabel ?? \"Write a different one\"}\n                  </button>\n                </div>\n              </>\n            ) : (\n              <Questionnaire\n                defaultItem={steps[0]?.name}\n                onItemChange={setActiveName}\n                shortcuts={shortcuts}\n                onSubmit={handleSubmit}\n                className=\"gap-6\"\n              >\n                {steps.length > 0 && <QuestionnaireProgress className=\"text-base\" />}\n\n                {steps.map((step, index) => (\n                  <QuestionnaireItem\n                    key={index}\n                    name={step.name}\n                    required={step.required}\n                    multiple={step.multiple}\n                  >\n                    <QuestionnaireTitle className=\"text-xl font-bold tracking-tight text-foreground md:text-2xl\">\n                      {step.title}\n                    </QuestionnaireTitle>\n                    {step.description && (\n                      <QuestionnaireDescription className=\"text-base text-muted-foreground md:text-lg\">\n                        {step.description}\n                      </QuestionnaireDescription>\n                    )}\n                    <QuestionnaireChoices>\n                      {step.choices?.map((choice, choiceIndex) => (\n                        <QuestionnaireChoice\n                          key={choiceIndex}\n                          value={choice.value}\n                          className=\"rounded-md p-4 text-base data-checked:border-foreground\"\n                        >\n                          <span className=\"font-bold text-foreground\">{choice.label}</span>\n                          {choice.description && (\n                            <QuestionnaireChoiceDescription className=\"text-base\">\n                              {choice.description}\n                            </QuestionnaireChoiceDescription>\n                          )}\n                        </QuestionnaireChoice>\n                      ))}\n                      {step.input && (\n                        <QuestionnaireInput\n                          type={step.input.type ?? \"text\"}\n                          aria-label={step.input.label}\n                          placeholder={step.input.placeholder}\n                          className=\"h-11 rounded-md px-4 text-base md:text-base\"\n                        />\n                      )}\n                    </QuestionnaireChoices>\n                    <QuestionnaireError className=\"text-base\" />\n                  </QuestionnaireItem>\n                ))}\n\n                <QuestionnaireActions>\n                  <QuestionnairePrevious className=\"cursor-pointer rounded-full text-base\">\n                    {previousLabel}\n                  </QuestionnairePrevious>\n                  <QuestionnaireNext className=\"cursor-pointer rounded-full bg-foreground text-base text-background hover:bg-foreground/90\">\n                    {nextLabel}\n                  </QuestionnaireNext>\n                  <QuestionnaireSubmit className=\"cursor-pointer rounded-full bg-foreground text-base text-background hover:bg-foreground/90\">\n                    {submitLabel}\n                  </QuestionnaireSubmit>\n                </QuestionnaireActions>\n              </Questionnaire>\n            )}\n          </div>\n        </div>\n\n        {notes.length > 0 && (\n          <div className=\"mt-16 grid gap-8 md:grid-cols-3\">\n            {notes.map((note, index) => (\n              <div key={index} className=\"border-t border-current/10 pt-6\">\n                <p className=\"text-xl font-bold tracking-tight text-foreground\">{note.title}</p>\n                <p className=\"mt-3 text-lg leading-relaxed text-muted-foreground\">\n                  {note.description}\n                </p>\n              </div>\n            ))}\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/agency24.tsx"
    },
    {
      "path": "registry-components/badge7/badge7.tsx",
      "content": "import { cn } from \"@/lib/utils\";\n\n/** Allowed wrapper styles, a fixed set, not arbitrary characters. */\ntype Badge7Bracket = \"round\" | \"square\" | \"curly\" | \"angle\" | \"none\";\n\nconst BRACKETS: Record<Badge7Bracket, [open: string, close: string]> = {\n  round: [\"(\", \")\"],\n  square: [\"[\", \"]\"],\n  curly: [\"{\", \"}\"],\n  angle: [\"<\", \">\"],\n  none: [\"\", \"\"],\n};\n\ntype Tone = \"muted\" | \"foreground\" | \"primary\";\n\ninterface Badge7Props {\n  /** Eyebrow label */\n  label: string;\n  /** Which characters wrap the label. Limited to the BRACKETS set. */\n  bracket?: Badge7Bracket;\n  /** Label color */\n  tone?: Tone;\n  /** Render rotated for vertical edge placement (e.g. along a hero side) */\n  vertical?: boolean;\n  /** Additional classes merged onto the root */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  muted: \"text-muted-foreground\",\n  foreground: \"text-foreground\",\n  primary: \"text-primary\",\n};\n\nexport const badge7Demo: Badge7Props = {\n  label: \"About\",\n};\n\nexport function Badge7({\n  label,\n  bracket = \"round\",\n  tone = \"muted\",\n  vertical = false,\n  className,\n}: Badge7Props) {\n  const [open, close] = BRACKETS[bracket];\n\n  return (\n    <span\n      className={cn(\n        \"text-base font-medium\",\n        toneStyles[tone],\n        vertical ? \"rotate-180 [writing-mode:vertical-rl]\" : \"inline-block\",\n        className\n      )}\n    >\n      {`${open}${label}${close}`}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/badge7.tsx"
    },
    {
      "path": "registry-components/button12/button12.tsx",
      "content": "\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ArrowUpRight, type LucideIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"dark\" | \"primary\" | \"outline\";\n\ninterface Button12Props {\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  /** Seal icon (defaults to ArrowUpRight) */\n  icon?: LucideIcon;\n  /** Surface tone: solid dark (default), solid primary, or bordered 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, { pill: string; seal: string }> = {\n  dark: {\n    pill: \"bg-foreground text-background hover:bg-foreground/90\",\n    seal: \"bg-background text-foreground\",\n  },\n  primary: {\n    pill: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n    seal: \"bg-primary-foreground text-primary\",\n  },\n  outline: {\n    pill: \"border bg-background text-foreground hover:bg-muted\",\n    seal: \"bg-foreground text-background\",\n  },\n};\n\nexport const button12Demo: Button12Props = {\n  label: \"Book an intro call\",\n};\n\nexport function Button12({\n  label,\n  asChild = false,\n  children,\n  href,\n  icon: Icon = ArrowUpRight,\n  tone = \"dark\",\n  onClick,\n  className,\n}: Button12Props) {\n  const styles = toneStyles[tone];\n\n  const classes = cn(\n    \"group/button12 inline-flex w-fit cursor-pointer items-center gap-3 rounded-full py-2 pl-8 pr-2 text-base font-bold transition-colors\",\n    styles.pill,\n    className\n  );\n\n  const inner = (\n    <>\n      {/* Label slides out the bottom while a copy drops in from the top */}\n      <span className=\"relative block overflow-hidden\">\n        <span className=\"block transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-y-full\">\n          {label}\n        </span>\n        <span\n          aria-hidden=\"true\"\n          className=\"absolute inset-0 block -translate-y-full transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-y-0\"\n        >\n          {label}\n        </span>\n      </span>\n\n      {/* Seal: icon exits the top-right corner as a copy enters from bottom-left */}\n      <span\n        className={cn(\n          \"relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full\",\n          styles.seal\n        )}\n      >\n        <Icon className=\"size-4 transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-x-[160%] motion-safe:group-hover/button12:-translate-y-[160%]\" />\n        <Icon\n          aria-hidden=\"true\"\n          className=\"absolute size-4 -translate-x-[160%] translate-y-[160%] transition-transform duration-300 ease-out motion-safe:group-hover/button12:translate-x-0 motion-safe:group-hover/button12:translate-y-0\"\n        />\n      </span>\n    </>\n  );\n\n  if (asChild && React.isValidElement(children)) {\n    return (\n      <Slot className={classes}>\n        {React.cloneElement(children, undefined, inner)}\n      </Slot>\n    );\n  }\n\n  if (href) {\n    return (\n      <a href={href} className={classes}>\n        {inner}\n      </a>\n    );\n  }\n\n  return (\n    <button type=\"button\" onClick={onClick} className={classes}>\n      {inner}\n    </button>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/button12.tsx"
    }
  ],
  "type": "registry:block"
}