{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "forms-11",
  "type": "registry:block",
  "description": "Project cost estimator with type cards, sliders and toggles driving a live price range.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input",
    "label",
    "slider",
    "switch"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/forms/forms-11.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  ArrowRight,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Input } from \"@workspace/ui/components/input\"\nimport { Label } from \"@workspace/ui/components/label\"\nimport { Slider } from \"@workspace/ui/components/slider\"\nimport { Switch } from \"@workspace/ui/components/switch\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst projectTypes = [\n  { id: \"landing\", label: \"Landing page\", base: 6000 },\n  { id: \"site\", label: \"Marketing site\", base: 18000 },\n  { id: \"app\", label: \"Web app\", base: 42000 },\n]\n\nconst toNumber = (value: number | readonly number[]) =>\n  Array.isArray(value) ? value[0] : (value as number)\n\nexport default function Forms11() {\n  const [type, setType] = useState(\"site\")\n  const [pages, setPages] = useState(8)\n  const [weeks, setWeeks] = useState(8)\n  const [cms, setCms] = useState(true)\n  const [copy, setCopy] = useState(false)\n\n  const base = projectTypes.find((item) => item.id === type)?.base ?? 0\n  const rush = weeks < 6 ? 1.25 : 1\n  const estimate = Math.round(\n    (base + pages * 900 + (cms ? 4500 : 0) + (copy ? pages * 350 : 0)) * rush\n  )\n  const low = Math.round((estimate * 0.9) / 500) * 500\n  const high = Math.round((estimate * 1.15) / 500) * 500\n\n  return (\n    <section className=\"w-full bg-muted/40 py-20\">\n      <div className=\"mx-auto max-w-7xl px-6\">\n        <div className=\"max-w-2xl\">\n          <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">Project estimator</p>\n          <h2 className=\"mt-4 text-4xl font-semibold tracking-tight md:text-5xl\">\n            Estimate your Designali project in a minute.\n          </h2>\n        </div>\n\n        <div className=\"mt-12 grid border border-border bg-background lg:grid-cols-[1.5fr_1fr]\">\n          <form className=\"space-y-10 p-6 md:p-10\">\n            <fieldset>\n              <legend className=\"text-sm font-medium\">What are we building?</legend>\n              <div className=\"mt-4 grid gap-2 sm:grid-cols-3\">\n                {projectTypes.map((item) => (\n                  <button\n                    key={item.id}\n                    type=\"button\"\n                    onClick={() => setType(item.id)}\n                    aria-pressed={type === item.id}\n                    className={cn(\n                      \"border p-4 text-left transition-colors\",\n                      type === item.id\n                        ? \"border-foreground bg-foreground text-background\"\n                        : \"border-border hover:bg-muted\"\n                    )}\n                  >\n                    <span className=\"block text-sm font-medium\">{item.label}</span>\n                    <span className=\"mt-1 block text-xs opacity-70\">\n                      from ${item.base.toLocaleString()}\n                    </span>\n                  </button>\n                ))}\n              </div>\n            </fieldset>\n\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center justify-between text-sm\">\n                <span className=\"font-medium\">Unique page templates</span>\n                <span className=\"font-sans\">{pages}</span>\n              </div>\n              <Slider\n                value={[pages]}\n                min={1}\n                max={30}\n                onValueChange={(value) => setPages(toNumber(value))}\n                aria-label=\"Unique page templates\"\n              />\n            </div>\n\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center justify-between text-sm\">\n                <span className=\"font-medium\">Timeline</span>\n                <span className=\"font-sans\">\n                  {weeks} weeks{weeks < 6 && <span className=\"ml-2 text-primary dark:text-primary\">rush</span>}\n                </span>\n              </div>\n              <Slider\n                value={[weeks]}\n                min={3}\n                max={20}\n                onValueChange={(value) => setWeeks(toNumber(value))}\n                aria-label=\"Timeline in weeks\"\n              />\n            </div>\n\n            <div className=\"divide-y divide-border border border-border\">\n              <Label className=\"flex items-center justify-between gap-4 p-4\">\n                <span>\n                  <span className=\"block text-sm font-medium\">Headless CMS setup</span>\n                  <span className=\"text-xs font-normal text-muted-foreground\">Content modelling, previews and roles</span>\n                </span>\n                <Switch checked={cms} onCheckedChange={setCms} />\n              </Label>\n              <Label className=\"flex items-center justify-between gap-4 p-4\">\n                <span>\n                  <span className=\"block text-sm font-medium\">Copywriting</span>\n                  <span className=\"text-xs font-normal text-muted-foreground\">Brand voice and website copy</span>\n                </span>\n                <Switch checked={copy} onCheckedChange={setCopy} />\n              </Label>\n            </div>\n          </form>\n\n          <div className=\"flex flex-col justify-between gap-10 border-t border-border bg-foreground p-6 text-background md:p-10 lg:border-t-0 lg:border-l\">\n            <div>\n              <p className=\"text-xs tracking-widest uppercase opacity-60\">Estimated investment</p>\n              <p className=\"mt-4 text-4xl font-semibold tracking-tight md:text-5xl\" aria-live=\"polite\">\n                ${low.toLocaleString()}\n                <span className=\"opacity-50\"> - </span>\n                ${high.toLocaleString()}\n              </p>\n              <p className=\"mt-4 text-sm leading-6 opacity-70\">\n                Based on similar Designali projects. Final quotes follow a\n                30-minute scoping call with Ali Imam.\n              </p>\n            </div>\n            <div className=\"space-y-3\">\n              <Label htmlFor=\"f11-email\" className=\"text-background/80\">\n                Send me the detailed breakdown\n              </Label>\n              <div className=\"flex flex-col gap-2 sm:flex-row lg:flex-col xl:flex-row\">\n                <Input\n                  id=\"f11-email\"\n                  type=\"email\"\n                  placeholder=\"you@example.com\"\n                  className=\"h-11 border-background/20 bg-transparent text-background placeholder:text-background/50 dark:bg-transparent\"\n                />\n                <Button size=\"lg\" className=\"bg-background text-foreground hover:bg-background/90\">\n                  Send\n                  <ArrowRight />\n                </Button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "850px"
  },
  "categories": [
    "forms"
  ]
}