{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "media-10",
  "type": "registry:block",
  "description": "Livestream player with live badges, channel info and an interactive live chat sidebar.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/media/media-10.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Eye, Heart, Send, Share2, Signal } from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Input } from \"@workspace/ui/components/input\"\n\ntype Msg = { user: string; text: string; color: string; host?: boolean }\n\nconst initial: Msg[] = [\n  {\n    user: \"tomasz_b\",\n    text: \"audio is crisp today\",\n    color: \"text-primary dark:text-primary\",\n  },\n  {\n    user: \"hana.k\",\n    text: \"will the template be shared after?\",\n    color: \"text-primary dark:text-primary\",\n  },\n  {\n    user: \"Designali\",\n    text: \"Yes! The template link goes out to everyone at the end.\",\n    color: \"text-foreground\",\n    host: true,\n  },\n  {\n    user: \"ravi_codes\",\n    text: \"joining from Pune, morning all\",\n    color: \"text-primary dark:text-primary\",\n  },\n  {\n    user: \"mel_w\",\n    text: \"can you zoom in on the config panel?\",\n    color: \"text-primary dark:text-primary\",\n  },\n  {\n    user: \"oskar\",\n    text: \"that keyboard shortcut just saved me an hour\",\n    color: \"text-primary dark:text-primary\",\n  },\n]\n\nexport default function Media10() {\n  const [messages, setMessages] = useState(initial)\n  const [draft, setDraft] = useState(\"\")\n  const [hearts, setHearts] = useState(2381)\n\n  return (\n    <section className=\"w-full bg-background py-16\">\n      <div className=\"mx-auto grid max-w-7xl gap-4 px-6 lg:grid-cols-[1fr_340px]\">\n        <div className=\"min-w-0\">\n          <div className=\"relative aspect-video w-full overflow-hidden border border-border bg-black\">\n            <img\n              src=\"/img/dashboard-1-dark.jpg\"\n              alt=\"Ali Imam sharing his screen on Designali Live\"\n              className=\"absolute inset-0 size-full object-cover\"\n            />\n            <div className=\"absolute top-3 left-3 flex items-center gap-2\">\n              <span className=\"flex items-center gap-1.5 bg-destructive px-2 py-0.5 text-xs font-semibold text-white\">\n                <span className=\"size-1.5 animate-pulse rounded-full bg-white\" />{\" \"}\n                LIVE\n              </span>\n              <span className=\"flex items-center gap-1 bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur\">\n                <Eye className=\"size-3\" /> 4,912\n              </span>\n            </div>\n            <span className=\"absolute top-3 right-3 flex items-center gap-1 bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur\">\n              <Signal className=\"size-3\" /> 1080p\n            </span>\n            <div className=\"absolute bottom-3 left-3 bg-black/60 px-3 py-2 text-white backdrop-blur\">\n              <p className=\"text-xs text-white/70\">Now presenting</p>\n              <p className=\"text-sm font-medium\">\n                Ali Imam - Building a design system in a weekend\n              </p>\n            </div>\n          </div>\n          <div className=\"mt-4 flex flex-wrap items-center justify-between gap-4\">\n            <div className=\"flex items-center gap-3\">\n              <span className=\"flex size-10 items-center justify-center rounded-full bg-foreground text-sm font-semibold text-background\">\n                DA\n              </span>\n              <div>\n                <p className=\"font-medium\">Designali Live</p>\n                <p className=\"text-xs text-muted-foreground\">\n                  Started 42 minutes ago - 38.1k followers\n                </p>\n              </div>\n            </div>\n            <div className=\"flex gap-2\">\n              <Button variant=\"outline\" onClick={() => setHearts((h) => h + 1)}>\n                <Heart className=\"text-primary\" /> {hearts.toLocaleString()}\n              </Button>\n              <Button variant=\"outline\">\n                <Share2 /> Share\n              </Button>\n              <Button>Follow</Button>\n            </div>\n          </div>\n        </div>\n        <aside className=\"flex h-[480px] flex-col border border-border lg:h-auto\">\n          <div className=\"flex items-center justify-between border-b border-border px-4 py-3\">\n            <p className=\"text-sm font-medium\">Live chat</p>\n            <span className=\"text-xs text-muted-foreground\">\n              {messages.length + 812} messages\n            </span>\n          </div>\n          <ul className=\"flex flex-1 flex-col-reverse gap-3 overflow-y-auto p-4 text-sm\">\n            {[...messages].reverse().map((m, i) => (\n              <li key={messages.length - i} className=\"break-words\">\n                <span className={`font-medium ${m.color}`}>{m.user}</span>\n                {m.host && (\n                  <span className=\"ml-1.5 bg-foreground px-1 py-px text-[10px] font-semibold text-background uppercase\">\n                    Host\n                  </span>\n                )}\n                <span className=\"ml-1.5 text-muted-foreground\">{m.text}</span>\n              </li>\n            ))}\n          </ul>\n          <form\n            className=\"flex gap-2 border-t border-border p-3\"\n            onSubmit={(e) => {\n              e.preventDefault()\n              if (!draft.trim()) return\n              setMessages((ms) => [\n                ...ms,\n                { user: \"you\", text: draft.trim(), color: \"text-foreground\" },\n              ])\n              setDraft(\"\")\n            }}\n          >\n            <Input\n              value={draft}\n              onChange={(e) => setDraft(e.target.value)}\n              placeholder=\"Say something...\"\n              aria-label=\"Chat message\"\n            />\n            <Button type=\"submit\" size=\"icon-lg\" aria-label=\"Send\">\n              <Send />\n            </Button>\n          </form>\n        </aside>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "700px"
  },
  "categories": [
    "media"
  ]
}