{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-13",
  "type": "registry:block",
  "description": "Conversational quote bot with chat bubbles, quick-reply option chips and a final email capture inside a chat window.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/contact/contact-13.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  SendHorizontal,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\ntype Message = { from: \"bot\" | \"user\"; text: string }\n\nconst flow = [\n  {\n    question: \"Hi there! I'm Ali's assistant at Designali. What are you hoping to build?\",\n    options: [\"Brand identity\", \"Website\", \"UI/UX design\", \"Something custom\"],\n  },\n  {\n    question: \"Lovely. Roughly what is your budget?\",\n    options: [\"Under $2k\", \"$2k - $5k\", \"$5k - $15k\", \"$15k+\"],\n  },\n  {\n    question: \"And when do you need it live?\",\n    options: [\"This week\", \"Within 2 weeks\", \"Next month\", \"Flexible\"],\n  },\n]\n\nexport default function Contact13() {\n  const [messages, setMessages] = useState<Message[]>([\n    { from: \"bot\", text: flow[0]!.question },\n  ])\n  const [step, setStep] = useState(0)\n  const [email, setEmail] = useState(\"\")\n\n  function answer(option: string) {\n    const next = step + 1\n    const reply: Message[] = [{ from: \"user\", text: option }]\n    if (flow[next]) reply.push({ from: \"bot\", text: flow[next].question })\n    else\n      reply.push({\n        from: \"bot\",\n        text: \"Perfect. Where should I send your quote? Ali Imam checks it before it goes out.\",\n      })\n    setMessages((m) => [...m, ...reply])\n    setStep(next)\n  }\n\n  function submit(event: React.FormEvent) {\n    event.preventDefault()\n    if (!email) return\n    setMessages((m) => [\n      ...m,\n      { from: \"user\", text: email },\n      {\n        from: \"bot\",\n        text: \"Thanks! Your quote will land in your inbox within the hour.\",\n      },\n    ])\n    setEmail(\"\")\n    setStep(flow.length + 1)\n  }\n\n  const options = flow[step]?.options\n\n  return (\n    <section className=\"w-full bg-background py-20 md:py-28\">\n      <div className=\"mx-auto grid max-w-6xl items-center gap-12 px-6 lg:grid-cols-[1fr_1.2fr]\">\n        <div>\n          <p className=\"text-xs font-medium tracking-widest text-muted-foreground uppercase\">\n            Instant quote\n          </p>\n          <h2 className=\"mt-3 text-4xl font-semibold tracking-tight md:text-5xl\">\n            Three questions. One honest price.\n          </h2>\n          <p className=\"mt-4 max-w-md text-muted-foreground\">\n            Answer a few quick prompts and we&apos;ll put together a Designali\n            quote with scope, timeline and deliverables included.\n          </p>\n        </div>\n\n        <div className=\"flex h-[520px] flex-col border bg-card\">\n          <div className=\"flex items-center gap-3 border-b px-5 py-4\">\n            <span className=\"flex size-9 items-center justify-center rounded-full bg-gradient-to-br from-chart-1 to-primary text-xs font-semibold text-black/80\">\n              P\n            </span>\n            <div className=\"text-sm\">\n              <p className=\"font-medium\">Designali</p>\n              <p className=\"text-xs text-muted-foreground\">Ali&apos;s assistant &middot; online</p>\n            </div>\n          </div>\n\n          <div className=\"flex flex-1 flex-col-reverse overflow-y-auto p-5\">\n            <div className=\"space-y-3\">\n              {messages.map((message, index) => (\n                <div\n                  key={index}\n                  className={cn(\n                    \"flex\",\n                    message.from === \"user\" ? \"justify-end\" : \"justify-start\"\n                  )}\n                >\n                  <p\n                    className={cn(\n                      \"max-w-[80%] px-4 py-2.5 text-sm\",\n                      message.from === \"user\"\n                        ? \"bg-primary text-primary-foreground\"\n                        : \"bg-muted\"\n                    )}\n                  >\n                    {message.text}\n                  </p>\n                </div>\n              ))}\n            </div>\n          </div>\n\n          <div className=\"border-t p-4\">\n            {options ? (\n              <div className=\"flex flex-wrap gap-2\">\n                {options.map((option) => (\n                  <button\n                    key={option}\n                    type=\"button\"\n                    onClick={() => answer(option)}\n                    className=\"border px-3 py-2 text-sm transition-colors hover:border-foreground hover:bg-muted\"\n                  >\n                    {option}\n                  </button>\n                ))}\n              </div>\n            ) : step === flow.length ? (\n              <form onSubmit={submit} className=\"flex gap-2\">\n                <input\n                  type=\"email\"\n                  required\n                  value={email}\n                  onChange={(event) => setEmail(event.target.value)}\n                  placeholder=\"you@example.com\"\n                  className=\"h-10 min-w-0 flex-1 border bg-background px-3 text-sm outline-none focus:border-ring\"\n                />\n                <button\n                  type=\"submit\"\n                  aria-label=\"Send\"\n                  className=\"flex size-10 items-center justify-center bg-primary text-primary-foreground\"\n                >\n                  <SendHorizontal className=\"size-4\" />\n                </button>\n              </form>\n            ) : (\n              <button\n                type=\"button\"\n                onClick={() => {\n                  setMessages([{ from: \"bot\", text: flow[0]!.question }])\n                  setStep(0)\n                }}\n                className=\"text-sm text-muted-foreground underline underline-offset-4\"\n              >\n                Start a new quote\n              </button>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "720px"
  },
  "categories": [
    "contact"
  ]
}