{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "media-16",
  "type": "registry:block",
  "description": "Inverted radio station band with an animated equalizer dial, station grid and schedule.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/media/media-16.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Pause, Play, Radio, Volume2 } from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst stations = [\n  {\n    name: \"Deep Work\",\n    genre: \"Ambient - Downtempo\",\n    listeners: \"2.4k\",\n    freq: \"88.1\",\n  },\n  { name: \"Pixel Jazz\", genre: \"Jazz - Soul\", listeners: \"1.1k\", freq: \"92.6\" },\n  {\n    name: \"Code Beats\",\n    genre: \"Electronic - House\",\n    listeners: \"5.8k\",\n    freq: \"97.3\",\n  },\n  {\n    name: \"Studio Talk\",\n    genre: \"Talk - Design and code\",\n    listeners: \"860\",\n    freq: \"101.9\",\n  },\n]\nconst schedule = [\n  {\n    time: \"18:00\",\n    show: \"Design se Code Tak\",\n    host: \"with Ali Imam\",\n    live: true,\n  },\n  { time: \"20:00\", show: \"Figma Hour\", host: \"with Sara\" },\n  { time: \"22:00\", show: \"Night Build\", host: \"with Omar\" },\n  { time: \"00:00\", show: \"Overnight Drift\", host: \"automated mix\" },\n]\n\nexport default function Media16() {\n  const [station, setStation] = useState(0)\n  const [playing, setPlaying] = useState(true)\n  const current = stations[station]!\n\n  return (\n    <section className=\"w-full bg-foreground py-20 text-background\">\n      <style>{`@keyframes m16-eq{0%,100%{transform:scaleY(.25)}50%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){.m16-bar{animation:none!important}}`}</style>\n      <div className=\"mx-auto grid max-w-6xl gap-12 px-6 lg:grid-cols-[1fr_1fr] lg:items-center\">\n        <div className=\"flex flex-col items-center\">\n          <div className=\"relative flex aspect-square w-full max-w-sm items-center justify-center rounded-full border border-background/15\">\n            <div className=\"absolute inset-6 rounded-full border border-background/10\" />\n            <div className=\"absolute inset-14 rounded-full border border-background/10\" />\n            <div className=\"flex h-24 items-center gap-1\" aria-hidden>\n              {Array.from({ length: 16 }).map((_, i) => (\n                <span\n                  key={i}\n                  className=\"m16-bar h-full w-1.5 origin-center bg-background\"\n                  style={{\n                    animation: `m16-eq ${0.6 + ((i * 7) % 5) * 0.15}s ease-in-out ${i * 0.07}s infinite`,\n                    animationPlayState: playing ? \"running\" : \"paused\",\n                    opacity: 0.4 + (i % 4) * 0.15,\n                  }}\n                />\n              ))}\n            </div>\n            <span className=\"absolute top-10 flex items-center gap-1.5 text-xs tracking-widest uppercase\">\n              <span\n                className={cn(\n                  \"size-1.5 rounded-full\",\n                  playing ? \"bg-destructive\" : \"bg-background/40\"\n                )}\n              />\n              {playing ? \"On air\" : \"Paused\"}\n            </span>\n            <span className=\"absolute bottom-10 font-sans text-3xl font-semibold tabular-nums\">\n              {current.freq}\n            </span>\n          </div>\n          <div className=\"mt-8 flex items-center gap-4\">\n            <button\n              type=\"button\"\n              aria-label={playing ? \"Pause\" : \"Play\"}\n              onClick={() => setPlaying((p) => !p)}\n              className=\"flex size-14 items-center justify-center rounded-full bg-background text-foreground transition-transform active:scale-95\"\n            >\n              {playing ? (\n                <Pause className=\"size-6 fill-current\" />\n              ) : (\n                <Play className=\"size-6 translate-x-0.5 fill-current\" />\n              )}\n            </button>\n            <div>\n              <p className=\"text-lg font-semibold\">{current.name}</p>\n              <p className=\"text-sm text-background/60\">{current.genre}</p>\n            </div>\n            <Volume2 className=\"ml-4 size-5 text-background/60\" />\n          </div>\n        </div>\n        <div>\n          <p className=\"flex items-center gap-2 text-xs tracking-widest text-background/60 uppercase\">\n            <Radio className=\"size-3.5\" /> Designali Radio\n          </p>\n          <h2 className=\"mt-3 text-3xl font-semibold tracking-tight md:text-4xl\">\n            Music for design and code, streaming 24/7.\n          </h2>\n          <ul className=\"mt-8 grid grid-cols-2 gap-px border border-background/15 bg-background/15\">\n            {stations.map((s, i) => (\n              <li key={s.name}>\n                <button\n                  type=\"button\"\n                  onClick={() => {\n                    setStation(i)\n                    setPlaying(true)\n                  }}\n                  className={cn(\n                    \"h-full w-full p-4 text-left transition-colors\",\n                    i === station\n                      ? \"bg-background text-foreground\"\n                      : \"bg-foreground hover:bg-background/10\"\n                  )}\n                >\n                  <span className=\"font-sans text-xs opacity-60\">{s.freq}</span>\n                  <span className=\"mt-1 block truncate font-medium\">\n                    {s.name}\n                  </span>\n                  <span className=\"mt-0.5 block text-xs opacity-60\">\n                    {s.listeners} listening\n                  </span>\n                </button>\n              </li>\n            ))}\n          </ul>\n          <h3 className=\"mt-10 text-sm font-medium\">\n            Tonight on {current.name}\n          </h3>\n          <ol className=\"mt-3 divide-y divide-background/15 border-y border-background/15\">\n            {schedule.map((item) => (\n              <li\n                key={item.time}\n                className=\"flex items-center gap-4 py-3 text-sm\"\n              >\n                <span className=\"w-12 font-sans text-background/60 tabular-nums\">\n                  {item.time}\n                </span>\n                <span className=\"min-w-0 flex-1 truncate\">\n                  <span className=\"font-medium\">{item.show}</span>{\" \"}\n                  <span className=\"text-background/60\">{item.host}</span>\n                </span>\n                {item.live && (\n                  <span className=\"bg-destructive px-1.5 py-0.5 text-[10px] font-semibold text-white uppercase\">\n                    Live\n                  </span>\n                )}\n              </li>\n            ))}\n          </ol>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "850px"
  },
  "categories": [
    "media"
  ]
}