{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "media-17",
  "type": "registry:block",
  "description": "Searchable, topic-filtered table of webinar replay recordings.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "input"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/media/media-17.tsx",
      "content": "\"use client\"\n\nimport { useMemo, useState } from \"react\"\nimport { Clock, CirclePlay as PlayCircle, Search } from \"@designali/icons\"\n\nimport { Badge } from \"@workspace/ui/components/badge\"\nimport { Input } from \"@workspace/ui/components/input\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst topics = [\"All\", \"Development\", \"Design\", \"Brand\", \"Motion\"] as const\nconst recordings = [\n  {\n    title: \"Building Designali blocks with Next.js\",\n    speaker: \"Ali Imam\",\n    topic: \"Development\",\n    date: \"Oct 28\",\n    length: \"52 min\",\n    views: \"3.1k\",\n  },\n  {\n    title: \"Design critiques that don't hurt\",\n    speaker: \"Sara\",\n    topic: \"Design\",\n    date: \"Oct 21\",\n    length: \"38 min\",\n    views: \"2.4k\",\n  },\n  {\n    title: \"Brand identity from a blank page\",\n    speaker: \"Nina\",\n    topic: \"Brand\",\n    date: \"Oct 14\",\n    length: \"45 min\",\n    views: \"4.8k\",\n  },\n  {\n    title: \"Design se code tak: one person, full stack\",\n    speaker: \"Ali Imam\",\n    topic: \"Development\",\n    date: \"Oct 07\",\n    length: \"61 min\",\n    views: \"5.2k\",\n  },\n  {\n    title: \"Motion design for product teams\",\n    speaker: \"Yuki\",\n    topic: \"Motion\",\n    date: \"Sep 30\",\n    length: \"29 min\",\n    views: \"1.9k\",\n  },\n  {\n    title: \"Tailwind CSS tokens without the mess\",\n    speaker: \"Omar\",\n    topic: \"Development\",\n    date: \"Sep 23\",\n    length: \"41 min\",\n    views: \"2.7k\",\n  },\n  {\n    title: \"Logos that last, with @designali/logos\",\n    speaker: \"Nina\",\n    topic: \"Brand\",\n    date: \"Sep 16\",\n    length: \"36 min\",\n    views: \"2.2k\",\n  },\n]\n\nexport default function Media17() {\n  const [topic, setTopic] = useState<(typeof topics)[number]>(\"All\")\n  const [query, setQuery] = useState(\"\")\n\n  const rows = useMemo(\n    () =>\n      recordings.filter(\n        (r) =>\n          (topic === \"All\" || r.topic === topic) &&\n          (r.title + r.speaker).toLowerCase().includes(query.toLowerCase())\n      ),\n    [topic, query]\n  )\n\n  return (\n    <section className=\"w-full bg-background py-20\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"flex flex-col gap-6 md:flex-row md:items-end md:justify-between\">\n          <div>\n            <h2 className=\"text-3xl font-semibold tracking-tight md:text-4xl\">\n              Webinar replays\n            </h2>\n            <p className=\"mt-2 text-muted-foreground\">\n              Every session from the Designali Live series, free to watch.\n            </p>\n          </div>\n          <div className=\"relative w-full md:w-72\">\n            <Search className=\"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground\" />\n            <Input\n              value={query}\n              onChange={(e) => setQuery(e.target.value)}\n              placeholder=\"Search talks or speakers\"\n              aria-label=\"Search\"\n              className=\"pl-9\"\n            />\n          </div>\n        </div>\n        <div className=\"mt-8 flex flex-wrap gap-2\">\n          {topics.map((t) => (\n            <button\n              key={t}\n              type=\"button\"\n              aria-pressed={topic === t}\n              onClick={() => setTopic(t)}\n              className={cn(\n                \"border px-3 py-1.5 text-xs font-medium transition-colors\",\n                topic === t\n                  ? \"border-foreground bg-foreground text-background\"\n                  : \"border-border hover:bg-muted\"\n              )}\n            >\n              {t}\n            </button>\n          ))}\n        </div>\n        <div className=\"mt-6 border-t border-border\">\n          <div className=\"hidden grid-cols-[1fr_9rem_6rem_6rem_5rem] gap-4 border-b border-border py-3 text-xs text-muted-foreground md:grid\">\n            <span>Session</span>\n            <span>Topic</span>\n            <span>Date</span>\n            <span>Length</span>\n            <span className=\"text-right\">Views</span>\n          </div>\n          {rows.length === 0 ? (\n            <p className=\"py-16 text-center text-sm text-muted-foreground\">\n              No replays match &ldquo;{query}&rdquo;.\n            </p>\n          ) : (\n            <ul className=\"divide-y divide-border border-b border-border\">\n              {rows.map((r) => (\n                <li key={r.title}>\n                  <a\n                    href=\"#\"\n                    className=\"group grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-1 py-4 md:grid-cols-[1fr_9rem_6rem_6rem_5rem]\"\n                  >\n                    <span className=\"flex min-w-0 items-center gap-3 md:col-auto\">\n                      <PlayCircle className=\"size-5 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground\" />\n                      <span className=\"min-w-0\">\n                        <span className=\"block truncate font-medium group-hover:underline\">\n                          {r.title}\n                        </span>\n                        <span className=\"block text-sm text-muted-foreground\">\n                          {r.speaker}\n                        </span>\n                      </span>\n                    </span>\n                    <span className=\"hidden md:block\">\n                      <Badge variant=\"outline\">{r.topic}</Badge>\n                    </span>\n                    <span className=\"hidden text-sm text-muted-foreground md:block\">\n                      {r.date}\n                    </span>\n                    <span className=\"flex items-center gap-1.5 justify-self-end text-sm text-muted-foreground md:justify-self-start\">\n                      <Clock className=\"size-3.5\" />\n                      {r.length}\n                    </span>\n                    <span className=\"hidden text-right text-sm tabular-nums md:block\">\n                      {r.views}\n                    </span>\n                  </a>\n                </li>\n              ))}\n            </ul>\n          )}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "850px"
  },
  "categories": [
    "media"
  ]
}