{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-17",
  "type": "registry:block",
  "description": "Office grid with live local clocks per timezone, open or closed status and sun/moon indicators plus contact links.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/contact/contact-17.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport {\n  Moon,\n  Sun,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst offices = [\n  { city: \"San Francisco\", zone: \"America/Los_Angeles\", email: \"hello@designali.com\", phone: \"Book a call\" },\n  { city: \"New York\", zone: \"America/New_York\", email: \"hello@designali.com\", phone: \"Book a call\" },\n  { city: \"London\", zone: \"Europe/London\", email: \"hello@designali.com\", phone: \"Book a call\" },\n  { city: \"Berlin\", zone: \"Europe/Berlin\", email: \"hello@designali.com\", phone: \"Book a call\" },\n  { city: \"Singapore\", zone: \"Asia/Singapore\", email: \"hello@designali.com\", phone: \"Book a call\" },\n  { city: \"Sydney\", zone: \"Australia/Sydney\", email: \"hello@designali.com\", phone: \"Book a call\" },\n]\n\nfunction localTime(date: Date, zone: string) {\n  const time = new Intl.DateTimeFormat(\"en-GB\", {\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n    timeZone: zone,\n  }).format(date)\n  const hour = Number(\n    new Intl.DateTimeFormat(\"en-GB\", { hour: \"numeric\", hourCycle: \"h23\", timeZone: zone }).format(date)\n  )\n  return { time, open: hour >= 9 && hour < 18 }\n}\n\nexport default function Contact17() {\n  const [now, setNow] = useState<Date | null>(null)\n\n  useEffect(() => {\n    const tick = () => setNow(new Date())\n    const first = setTimeout(tick, 0)\n    const id = setInterval(tick, 30_000)\n    return () => {\n      clearTimeout(first)\n      clearInterval(id)\n    }\n  }, [])\n\n  return (\n    <section className=\"w-full bg-background py-20 md:py-28\">\n      <div className=\"mx-auto max-w-7xl px-6\">\n        <div className=\"flex flex-col justify-between gap-6 md:flex-row md:items-end\">\n          <div>\n            <p className=\"text-xs font-medium tracking-widest text-muted-foreground uppercase\">\n              Clients everywhere\n            </p>\n            <h2 className=\"mt-3 text-4xl font-semibold tracking-tight md:text-5xl\">\n              Designali works across time zones.\n            </h2>\n          </div>\n          <p className=\"max-w-sm text-muted-foreground\">\n            Ali Imam works async with clients worldwide. Green means it&apos;s\n            working hours in that city.\n          </p>\n        </div>\n\n        <ul className=\"mt-12 grid gap-px border bg-border sm:grid-cols-2 lg:grid-cols-3\">\n          {offices.map((office) => {\n            const info = now ? localTime(now, office.zone) : null\n            return (\n              <li key={office.city} className=\"flex flex-col gap-10 bg-background p-6 md:p-8\">\n                <div className=\"flex items-start justify-between gap-4\">\n                  <div>\n                    <p className=\"text-lg font-medium\">{office.city}</p>\n                    <p\n                      className={cn(\n                        \"mt-1 flex items-center gap-1.5 text-xs\",\n                        info?.open\n                          ? \"text-chart-3 dark:text-primary\"\n                          : \"text-muted-foreground\"\n                      )}\n                    >\n                      <span\n                        className={cn(\n                          \"size-1.5 rounded-full\",\n                          info?.open ? \"bg-primary\" : \"bg-muted-foreground/40\"\n                        )}\n                      />\n                      {info ? (info.open ? \"Open now\" : \"Closed\") : \" \"}\n                    </p>\n                  </div>\n                  {info?.open ? (\n                    <Sun className=\"size-5 text-primary\" />\n                  ) : (\n                    <Moon className=\"size-5 text-muted-foreground\" />\n                  )}\n                </div>\n                <p className=\"font-sans text-5xl font-light tracking-tight tabular-nums\">\n                  {info?.time ?? \"--:--\"}\n                </p>\n                <div className=\"space-y-1 border-t pt-4 text-sm\">\n                  <a href={`mailto:${office.email}`} className=\"block hover:underline\">\n                    {office.email}\n                  </a>\n                  <a href=\"https://cal.com/aliimam/30min\" className=\"block text-muted-foreground hover:text-foreground\">\n                    {office.phone}\n                  </a>\n                </div>\n              </li>\n            )\n          })}\n        </ul>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "760px"
  },
  "categories": [
    "contact"
  ]
}