{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "reroute-regions-demo",
  "type": "registry:block",
  "title": "Reroute: Deploy Regions",
  "description": "Animated Failover Diagram example, Deploy Regions: A new project's region picker in electric blue: spin the wheel, press a region or use the arrow keys. A take on the flow diagram (flowchart). Fits hero and features sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "hero",
    "features",
    "flow-diagram",
    "interaction",
    "ai",
    "diagram"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/reroute#reroute-regions-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/reroute.json"
  ],
  "files": [
    {
      "path": "components/reroute-regions-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Reroute, type RerouteItem } from \"@/components/ui/reroute\";\n\n// Tidewater's deploy settings: pick the primary region for a new project.\nconst REGIONS = [\n  { code: \"IAD\", city: \"Ashburn\", country: \"US\", ms: 14 },\n  { code: \"PDX\", city: \"Portland\", country: \"US\", ms: 61 },\n  { code: \"GRU\", city: \"São Paulo\", country: \"BR\", ms: 118 },\n  { code: \"LHR\", city: \"London\", country: \"GB\", ms: 74 },\n  { code: \"FRA\", city: \"Frankfurt\", country: \"DE\", ms: 86 },\n  { code: \"BOM\", city: \"Mumbai\", country: \"IN\", ms: 196 },\n  { code: \"SIN\", city: \"Singapore\", country: \"SG\", ms: 221 },\n  { code: \"NRT\", city: \"Tokyo\", country: \"JP\", ms: 158 },\n  { code: \"SYD\", city: \"Sydney\", country: \"AU\", ms: 203 },\n];\n\nconst ITEMS: RerouteItem[] = REGIONS.map((r) => ({\n  id: r.code.toLowerCase(),\n  name: `${r.city}, ${r.country}`,\n  detail: `${r.code} · ${r.ms} ms from you`,\n  icon: (\n    <span className=\"grid size-full place-items-center font-mono text-[11px] font-semibold tracking-wide text-zinc-950 [@container(min-width:30rem)]:text-xs dark:text-white\">\n      {r.code}\n    </span>\n  ),\n}));\n\nexport function RerouteRegionsDemo() {\n  const [region, setRegion] = React.useState(\"iad\");\n  const picked = REGIONS.find((r) => r.code.toLowerCase() === region) ?? REGIONS[0];\n\n  return (\n    <div className=\"w-full max-w-lg overflow-hidden rounded-3xl border border-zinc-950/[0.08] bg-white shadow-[0_1px_2px_rgba(0,0,0,0.04)] dark:border-white/10 dark:bg-zinc-950\">\n      <div className=\"px-6 pt-6\">\n        <p className=\"text-[11px] font-medium uppercase tracking-[0.08em] text-[#2747ff] dark:text-[#7d8bff]\">New project · Step 2 of 3</p>\n        <h3 className=\"mt-1.5 text-lg font-semibold tracking-tight text-zinc-950 dark:text-white\">Where should it run?</h3>\n        <p className=\"mt-1 text-sm text-zinc-500 dark:text-zinc-400\">Spin the wheel or use the arrow keys. Latency is measured from your browser.</p>\n      </div>\n\n      <Reroute\n        className=\"mt-1 [--reroute-accent:#2747ff] dark:[--reroute-accent:#6b7cff]\"\n        label=\"Primary region\"\n        items={ITEMS}\n        value={region}\n        onValueChange={setRegion}\n        hub={\n          <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n            <path d=\"M4 7.5 12 3l8 4.5-8 4.5z\" />\n            <path d=\"M4 12l8 4.5 8-4.5\" />\n            <path d=\"M4 16.5 12 21l8-4.5\" />\n          </svg>\n        }\n      />\n\n      <div className=\"flex items-center justify-between gap-4 border-t border-zinc-950/[0.06] px-6 py-4 dark:border-white/[0.08]\">\n        <p className=\"min-w-0 text-xs text-zinc-500 dark:text-zinc-400\">\n          <span className=\"font-medium text-zinc-950 dark:text-white\">Replicas</span> follow in the two nearest regions.\n        </p>\n        <button\n          type=\"button\"\n          className=\"h-9 shrink-0 rounded-full bg-[#2747ff] px-4 text-[13px] font-medium text-white outline-offset-2 outline-[#2747ff] transition-transform duration-150 focus-visible:outline-2 active:scale-[0.97] dark:bg-[#5b6dff]\"\n        >\n          Deploy to {picked.city}\n        </button>\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}