{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "location-13",
  "type": "registry:block",
  "description": "Delivery zone checker with postcode lookup, result messages and concentric radius rings around a depot map.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/location/location-13.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  CircleCheck,\n  CircleX,\n  Globe,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Input } from \"@workspace/ui/components/input\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nimport { GridPattern } from \"@/registry/designali/ui/grid-pattern\"\n\nconst zones = [\n  { name: \"Full overlap\", radius: 70, fee: \"live calls\", time: \"Same day\", tone: \"fill-primary/25 stroke-primary\" },\n  { name: \"Partial overlap\", radius: 120, fee: \"morning calls\", time: \"Next morning\", tone: \"fill-primary/15 stroke-primary/70\" },\n  { name: \"Async\", radius: 170, fee: \"async updates\", time: \"Within 24 hours\", tone: \"fill-primary/5 stroke-primary/50\" },\n]\n\nconst postcodes: Record<string, number> = {\n  GST: 0,\n  IST: 0,\n  CET: 1,\n  EET: 1,\n  GMT: 1,\n  EST: 2,\n  SGT: 0,\n  PST: 2,\n}\n\nexport default function Location13() {\n  const [value, setValue] = useState(\"\")\n  const [result, setResult] = useState<number | null | \"none\">(null)\n\n  function check(event: React.FormEvent) {\n    event.preventDefault()\n    const key = value.trim().toUpperCase().split(\" \")[0] ?? \"\"\n    setResult(key in postcodes ? postcodes[key]! : \"none\")\n  }\n\n  const zone = typeof result === \"number\" ? zones[result] : null\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-2\">\n        <div>\n          <span className=\"inline-flex items-center gap-2 text-xs font-medium tracking-widest text-muted-foreground uppercase\">\n            <Globe className=\"size-4\" />\n            Time zones\n          </span>\n          <h2 className=\"mt-3 text-4xl font-semibold tracking-tight md:text-5xl\">\n            Do we overlap with your time zone?\n          </h2>\n          <p className=\"mt-4 max-w-md text-muted-foreground\">\n            Designali is a remote studio working with clients worldwide. Check how\n            we will collaborate with you. Try IST, CET or EST.\n          </p>\n\n          <form onSubmit={check} className=\"mt-8 flex max-w-md gap-2\">\n            <Input\n              value={value}\n              onChange={(event) => setValue(event.target.value)}\n              placeholder=\"Enter your time zone\"\n              className=\"h-12 uppercase placeholder:normal-case\"\n              aria-label=\"Time zone\"\n            />\n            <Button type=\"submit\" size=\"lg\" className=\"h-12\">\n              Check\n            </Button>\n          </form>\n\n          <div aria-live=\"polite\" className=\"mt-6 min-h-20 max-w-md\">\n            {zone && (\n              <div className=\"flex gap-3 border border-primary/40 bg-primary/5 p-4 text-sm dark:bg-primary/30\">\n                <CircleCheck className=\"size-5 shrink-0 text-primary dark:text-primary\" />\n                <p>\n                  Good news, you&apos;re in <strong>{zone.name}</strong>. We work through{\" \"}\n                  <strong>{zone.fee}</strong> and reply <strong>{zone.time.toLowerCase()}</strong>.\n                </p>\n              </div>\n            )}\n            {result === \"none\" && (\n              <div className=\"flex gap-3 border bg-muted p-4 text-sm\">\n                <CircleX className=\"size-5 shrink-0 text-muted-foreground\" />\n                <p>\n                  We don&apos;t recognise that time zone yet. Email\n                  hello@designali.com and we&apos;ll work out a schedule.\n                </p>\n              </div>\n            )}\n          </div>\n        </div>\n\n        <div className=\"relative overflow-hidden border bg-muted/40 p-4\">\n          <GridPattern width={40} height={40} className=\"stroke-border\" />\n          <svg viewBox=\"0 0 400 400\" className=\"relative h-auto w-full\" role=\"img\" aria-label=\"Designali collaboration zones\">\n            <path d=\"M0 260 C 90 240, 140 300, 230 250 S 350 200, 400 230\" className=\"fill-none stroke-chart-1 dark:stroke-chart-4\" strokeWidth=\"14\" />\n            {[...zones].reverse().map((z, i) => {\n              const index = zones.length - 1 - i\n              return (\n                <circle\n                  key={z.name}\n                  cx=\"200\"\n                  cy=\"200\"\n                  r={z.radius}\n                  strokeWidth=\"1.5\"\n                  strokeDasharray={index === 0 ? undefined : \"4 4\"}\n                  className={cn(\n                    z.tone,\n                    \"transition-opacity\",\n                    zone && result !== index && \"opacity-40\"\n                  )}\n                />\n              )\n            })}\n            <circle cx=\"200\" cy=\"200\" r=\"9\" className=\"fill-foreground\" />\n            <text x=\"214\" y=\"196\" className=\"fill-foreground text-[11px] font-medium\">Designali</text>\n            {zones.map((z) => (\n              <text key={z.name} x=\"200\" y={200 - z.radius + 14} textAnchor=\"middle\" className=\"fill-muted-foreground text-[10px]\">\n                {z.name} &middot; {z.fee}\n              </text>\n            ))}\n          </svg>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "700px"
  },
  "categories": [
    "location"
  ]
}