{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "video-call-ui",
  "title": "Video Call UI",
  "description": "A complete meeting screen: participant tiles with an active-speaker ring and live audio bars, grid and speaker layouts that morph, screen sharing with a filmstrip, mute, camera, raise hand, floating emoji reactions, a chat you can type in, a people list, a running call timer, keyboard shortcuts, and leave with rejoin.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/video-call-ui/video-call-ui.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, LayoutGroup, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\ntype Panel = null | \"chat\" | \"people\";\nexport interface CallParticipant {\n  id: string;\n  name: string;\n  role?: string;\n  muted?: boolean;\n  colors: [string, string];\n}\n\nexport interface VideoCallUIProps {\n  title?: string;\n  participants?: CallParticipant[];\n  you?: string;\n  startSeconds?: number;\n  onLeave?: () => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#08080A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.62)\", faint: \"rgba(245,244,241,0.36)\", tile: \"#141417\", panel: \"#111113\", bar: \"rgba(255,255,255,0.06)\", border: \"rgba(255,255,255,0.08)\", btn: \"rgba(255,255,255,0.08)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", red: \"#EF4444\", green: \"#4ADE80\", amber: \"#FBBF24\", ring: \"rgba(245,244,241,0.7)\" },\n  light: { bg: \"#F4F4F1\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.4)\", tile: \"#E6E6E2\", panel: \"#FFFFFF\", bar: \"rgba(10,10,10,0.05)\", border: \"rgba(10,10,10,0.09)\", btn: \"rgba(10,10,10,0.07)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", red: \"#DC2626\", green: \"#15803D\", amber: \"#B45309\", ring: \"rgba(10,10,10,0.5)\" },\n};\n\nconst PEOPLE: CallParticipant[] = [\n  { id: \"lena\", name: \"Lena Brandt\", role: \"Host\", colors: [\"#6366F1\", \"#0EA5E9\"] },\n  { id: \"daniel\", name: \"Daniel Reyes\", colors: [\"#F43F5E\", \"#F59E0B\"] },\n  { id: \"mia\", name: \"Mia Okafor\", muted: true, colors: [\"#A855F7\", \"#EC4899\"] },\n  { id: \"tomas\", name: \"Tomás Ferreira\", colors: [\"#10B981\", \"#14B8A6\"] },\n  { id: \"aiko\", name: \"Aiko Tanaka\", muted: true, colors: [\"#F97316\", \"#EAB308\"] },\n];\nconst CHAT0 = [\n  { id: \"c1\", who: \"Daniel Reyes\", text: \"Sharing the Q4 numbers in a sec\", at: \"10:02\" },\n  { id: \"c2\", who: \"Mia Okafor\", text: \"My mic is acting up, I'll type here\", at: \"10:03\" },\n];\nconst REACTIONS = [\"👏\", \"🎉\", \"❤️\", \"👍\", \"😂\"];\n\nconst initials = (n: string) =>\n  n\n    .split(\" \")\n    .map((w) => w[0])\n    .join(\"\")\n    .slice(0, 2);\nconst clock = (s: number) => `${String(Math.floor(s / 60)).padStart(2, \"0\")}:${String(s % 60).padStart(2, \"0\")}`;\n\nconst ICON = {\n  mic: \"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Zm-7 9a7 7 0 0 0 14 0M12 19v2\",\n  micOff: \"M3 3l18 18M9 9v3a3 3 0 0 0 5.1 2.1M15 9.3V6a3 3 0 0 0-5.7-1.3M19 12a7 7 0 0 1-1.1 3.8M5 12a7 7 0 0 0 10.6 6M12 19v2\",\n  cam: \"M3 7h12v10H3zM15 10l6-3v10l-6-3\",\n  camOff: \"M3 3l18 18M15 10l6-3v10l-6-3M3 7h4m8 0v6m0 4H3V7\",\n  screen: \"M3 4h18v12H3zM8 20h8M12 16v4\",\n  hand: \"M8 13V5.5a1.5 1.5 0 0 1 3 0V12m0-6.5V4a1.5 1.5 0 0 1 3 0v8m0-6a1.5 1.5 0 0 1 3 0v8a7 7 0 0 1-7 7h-1a6 6 0 0 1-5-2.7L3.5 15a1.5 1.5 0 0 1 2.4-1.8L8 15\",\n  smile: \"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 14a4 4 0 0 0 7 0M9 9.5h.01M15 9.5h.01\",\n  chat: \"M4 5h16v11H8l-4 4V5Z\",\n  people: \"M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm-6 9a6 6 0 0 1 12 0M16 4.5a3.5 3.5 0 0 1 0 6.5M21 20a6 6 0 0 0-3.5-5.5\",\n  phone: \"M5 15c4-3 10-3 14 0l-1.5 3-3-1v-2.5a9 9 0 0 0-5 0V17l-3 1L5 15Z\",\n  grid: \"M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z\",\n  speaker: \"M3 4h18v11H3zM3 18h5v2H3zM10 18h4v2h-4zM16 18h5v2h-5z\",\n};\nconst Svg = ({ d, size = 18 }: { d: string; size?: number }) => (\n  <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n    <path d={d} />\n  </svg>\n);\n\nexport function VideoCallUI({ title = \"Q4 planning\", participants = PEOPLE, you = \"You\", startSeconds = 724, onLeave, theme = \"dark\", className }: VideoCallUIProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [muted, setMuted] = React.useState(false);\n  const [camOn, setCamOn] = React.useState(true);\n  const [hand, setHand] = React.useState(false);\n  const [sharing, setSharing] = React.useState(false);\n  const [layout, setLayout] = React.useState<\"grid\" | \"speaker\">(\"grid\");\n  const [panel, setPanel] = React.useState<Panel>(null);\n  const [reactOpen, setReactOpen] = React.useState(false);\n  const [floaters, setFloaters] = React.useState<{ id: number; e: string; x: number }[]>([]);\n  const [chat, setChat] = React.useState(CHAT0);\n  const [draft, setDraft] = React.useState(\"\");\n  const [left, setLeft] = React.useState(false);\n  const [seconds, setSeconds] = React.useState(startSeconds);\n  const [beat, setBeat] = React.useState(0);\n  const counter = React.useRef(0);\n  const rootRef = React.useRef<HTMLElement>(null);\n  const focusOnce = React.useCallback((el: HTMLElement | null) => el?.focus({ preventScroll: true }), []);\n\n  const youLabel = you === \"You\" ? \"You\" : `${you} (you)`;\n  const everyone: CallParticipant[] = [...participants, { id: \"you\", name: you, colors: [\"#3F3F46\", \"#52525B\"], muted }];\n  const talkers = everyone.filter((x) => !x.muted && x.id !== \"you\");\n  const speakerId = talkers.length ? talkers[beat % talkers.length].id : null;\n\n  React.useEffect(() => {\n    if (left) return;\n    const a = setInterval(() => setSeconds((s) => s + 1), 1000);\n    const b = reduce ? null : setInterval(() => setBeat((n) => n + 1), 2600);\n    return () => {\n      clearInterval(a);\n      if (b) clearInterval(b);\n    };\n  }, [left, reduce]);\n  React.useEffect(() => {\n    if (!floaters.length) return;\n    const t = setTimeout(() => setFloaters((f) => f.slice(1)), 1800);\n    return () => clearTimeout(t);\n  }, [floaters]);\n  React.useEffect(() => {\n    const onKey = (e: KeyboardEvent) => {\n      if ((e.target as HTMLElement).closest(\"input, textarea, select\") || left) return;\n      if (!rootRef.current?.contains(document.activeElement) && document.activeElement !== document.body) return;\n      const k = e.key.toLowerCase();\n      if (k === \"m\") setMuted((m) => !m);\n      else if (k === \"v\") setCamOn((c) => !c);\n      else if (k === \"h\") setHand((h) => !h);\n      else if (k === \"escape\") {\n        setReactOpen(false);\n        setPanel(null);\n      }\n    };\n    document.addEventListener(\"keydown\", onKey);\n    return () => document.removeEventListener(\"keydown\", onKey);\n  }, [left]);\n\n  const react = (e: string) => {\n    counter.current += 1;\n    setFloaters((f) => [...f, { id: counter.current, e, x: 20 + ((counter.current * 37) % 60) }]);\n    setReactOpen(false);\n  };\n  const send = () => {\n    const text = draft.trim();\n    if (!text) return;\n    counter.current += 1;\n    setChat((c) => [...c, { id: `m${counter.current}`, who: you, text, at: clock(seconds) }]);\n    setDraft(\"\");\n  };\n  const togglePanel = (x: Exclude<Panel, null>) => {\n    setPanel((cur) => (cur === x ? null : x));\n  };\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.bg } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const ctrl = cn(\"relative grid h-11 w-11 shrink-0 cursor-pointer place-items-center rounded-full border-0 transition-colors @[640px]:h-12 @[640px]:w-12\", focus);\n  const spring = reduce ? { duration: 0 } : { type: \"spring\" as const, stiffness: 380, damping: 34 };\n\n  const tile = (x: CallParticipant, big = false) => {\n    const isYou = x.id === \"you\";\n    const speaking = speakerId === x.id;\n    const showVideo = isYou ? camOn : true;\n    return (\n      <motion.div\n        key={x.id}\n        layoutId={reduce ? undefined : `${uid}-${x.id}`}\n        transition={spring}\n        className={cn(\"relative min-h-0 overflow-hidden rounded-2xl\", big && \"w-full\")}\n        style={{ background: p.tile }}\n        role=\"group\"\n        aria-label={`${x.name}${x.muted ? \", muted\" : \"\"}${speaking ? \", speaking\" : \"\"}`}\n      >\n        {showVideo ? (\n          <div className=\"absolute inset-0\" style={{ background: `radial-gradient(120% 90% at 30% 20%, ${x.colors[0]}cc, ${x.colors[1]}66 55%, ${p.tile} 100%)` }}>\n            <motion.div className=\"absolute bottom-0 left-1/2 aspect-square h-[72%] -translate-x-1/2 translate-y-[22%] rounded-full\" style={{ background: \"rgba(0,0,0,0.22)\" }} animate={speaking && !reduce ? { y: [0, -3, 0] } : { y: 0 }} transition={{ repeat: speaking ? Infinity : 0, duration: 1.2 }} />\n            <div className=\"absolute top-[22%] left-1/2 aspect-square h-[34%] -translate-x-1/2 rounded-full\" style={{ background: \"rgba(0,0,0,0.22)\" }} />\n          </div>\n        ) : (\n          <div className=\"absolute inset-0 grid place-items-center\">\n            <span className={cn(\"grid place-items-center rounded-full font-semibold text-white\", big ? \"h-20 w-20 text-[24px]\" : \"h-12 w-12 text-[15px]\")} style={{ background: `linear-gradient(135deg, ${x.colors[0]}, ${x.colors[1]})` }}>\n              {isYou ? \"Y\" : initials(x.name)}\n            </span>\n          </div>\n        )}\n        {/* speaking ring, drawn inside the tile so scrolling filmstrips can't clip it */}\n        <motion.span className=\"pointer-events-none absolute inset-0 z-[1] rounded-2xl border-2\" style={{ borderColor: p.green }} initial={false} animate={{ opacity: speaking ? 1 : 0 }} transition={{ duration: reduce ? 0 : 0.2 }} aria-hidden=\"true\" />\n        {/* name + mic */}\n        <div className=\"absolute inset-x-2 bottom-2 flex items-center justify-between gap-2\">\n          <span className=\"flex min-w-0 items-center gap-1.5 rounded-md bg-black/45 px-2 py-1 text-[11.5px] font-medium text-white backdrop-blur-sm\">\n            {x.muted ? (\n              <span className=\"text-[#F87171]\">\n                <Svg d={ICON.micOff} size={12} />\n              </span>\n            ) : (\n              <span className=\"flex h-3 items-end gap-[2px]\" aria-hidden=\"true\">\n                {[0, 1, 2].map((i) => (\n                  <motion.span key={i} className=\"w-[2px] rounded-full bg-white\" animate={speaking && !reduce ? { height: [3, 10 - i * 2, 4, 9, 3] } : { height: 3 }} transition={{ repeat: speaking ? Infinity : 0, duration: 0.9, delay: i * 0.12 }} />\n                ))}\n              </span>\n            )}\n            <span className=\"truncate\">{isYou ? youLabel : x.name}</span>\n          </span>\n          {x.role && <span className=\"rounded-md bg-black/45 px-1.5 py-0.5 text-[10.5px] text-white/80 backdrop-blur-sm\">{x.role}</span>}\n        </div>\n        {isYou && (\n          <AnimatePresence>\n            {hand && (\n              <motion.span key=\"hand\" initial={reduce ? false : { scale: 0, rotate: -30 }} animate={{ scale: 1, rotate: reduce ? 0 : [0, -14, 10, -8, 0] }} exit={reduce ? undefined : { scale: 0 }} transition={{ duration: 0.6 }} className=\"absolute top-2 left-2 grid h-8 w-8 place-items-center rounded-full text-[16px]\" style={{ background: p.amber }} aria-label=\"Hand raised\">\n                ✋\n              </motion.span>\n            )}\n          </AnimatePresence>\n        )}\n        {isYou && (\n          <div className=\"pointer-events-none absolute inset-0 overflow-hidden\" aria-hidden=\"true\">\n            <AnimatePresence>\n              {floaters.map((f) => (\n                <motion.span key={f.id} className=\"absolute bottom-6 text-[26px]\" style={{ left: `${f.x}%` }} initial={{ y: 0, opacity: 0, scale: 0.6 }} animate={{ y: reduce ? 0 : -140, opacity: [0, 1, 1, 0], scale: 1 }} exit={{ opacity: 0 }} transition={{ duration: 1.7, ease: \"easeOut\" }}>\n                  {f.e}\n                </motion.span>\n              ))}\n            </AnimatePresence>\n          </div>\n        )}\n      </motion.div>\n    );\n  };\n\n  const n = everyone.length;\n  const gridCols = n <= 2 ? \"grid-cols-1 @[640px]:grid-cols-2\" : n <= 4 ? \"grid-cols-2\" : \"grid-cols-2 @[760px]:grid-cols-3\";\n  const featured = sharing ? null : layout === \"speaker\" ? (everyone.find((x) => x.id === speakerId) ?? everyone[0]) : null;\n\n  if (left)\n    return (\n      <section className={cn(\"@container grid min-h-[560px] w-full place-items-center\", className)} style={{ background: p.bg, color: p.text }}>\n        <motion.div initial={reduce ? false : { opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} className=\"px-4 text-center\" role=\"status\">\n          <p className=\"m-0 text-[20px] font-semibold\">You left {title}</p>\n          <p className=\"m-0 mt-1.5 text-[13.5px]\" style={{ color: p.muted }}>\n            The call is still going with {participants.length} people · {clock(seconds)}\n          </p>\n          <button type=\"button\" ref={focusOnce} onClick={() => setLeft(false)} className={cn(\"mt-5 h-10 cursor-pointer rounded-full border-0 px-5 text-[13.5px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n            Rejoin\n          </button>\n        </motion.div>\n      </section>\n    );\n\n  return (\n    <section ref={rootRef} className={cn(\"@container flex min-h-[560px] w-full flex-col\", className)} style={{ background: p.bg, color: p.text }} aria-label={`Call: ${title}`}>\n      {/* Top */}\n      <div className=\"flex items-center gap-3 px-4 py-3 @[640px]:px-5\">\n        <span className=\"flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11.5px] font-medium\" style={{ background: `${p.red}22`, color: p.red }}>\n          <motion.span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: p.red }} animate={reduce ? undefined : { opacity: [1, 0.3, 1] }} transition={{ repeat: Infinity, duration: 1.6 }} />\n          REC\n        </span>\n        <h2 className=\"m-0 min-w-0 truncate text-[14.5px] font-semibold\">{title}</h2>\n        <span className=\"text-[12.5px] tabular-nums\" style={{ color: p.muted }}>\n          {clock(seconds)}\n        </span>\n        <div role=\"radiogroup\" aria-label=\"Layout\" className=\"ml-auto flex rounded-lg p-0.5\" style={{ background: p.bar }}>\n          {([\"grid\", \"speaker\"] as const).map((l) => (\n            <button key={l} type=\"button\" role=\"radio\" aria-checked={layout === l} aria-label={l === \"grid\" ? \"Grid layout\" : \"Speaker layout\"} onClick={() => setLayout(l)} className={cn(\"relative grid h-7 w-8 cursor-pointer place-items-center rounded-md border-0 bg-transparent\", focus)} style={{ color: layout === l ? p.onText : p.muted, ...ring }}>\n              {layout === l && <motion.span layoutId={`${uid}-lay`} className=\"absolute inset-0 rounded-md\" style={{ background: p.on }} transition={spring} />}\n              <span className=\"relative\">\n                <Svg d={ICON[l]} size={14} />\n              </span>\n            </button>\n          ))}\n        </div>\n      </div>\n\n      {/* Stage */}\n      <div className=\"relative flex min-h-0 flex-1 gap-3 px-3 pb-3 @[640px]:px-4\">\n        <LayoutGroup id={uid}>\n          <div className=\"flex min-h-0 min-w-0 flex-1 flex-col gap-3\">\n            {sharing ? (\n              <>\n                <motion.div layout={!reduce} transition={spring} className=\"relative min-h-[220px] flex-1 overflow-hidden rounded-2xl border\" style={{ borderColor: p.border, background: p.panel }} role=\"img\" aria-label=\"Your shared screen: Q4 revenue dashboard\">\n                  <div className=\"flex h-7 items-center gap-1.5 border-b px-3\" style={{ borderColor: p.border }}>\n                    {[\"#F87171\", \"#FBBF24\", \"#4ADE80\"].map((c) => (\n                      <span key={c} className=\"h-2 w-2 rounded-full\" style={{ background: c }} />\n                    ))}\n                    <span className=\"ml-2 text-[11px]\" style={{ color: p.faint }}>\n                      Q4 revenue — dashboard\n                    </span>\n                  </div>\n                  <div className=\"flex h-[calc(100%-28px)] items-end gap-2 p-4\">\n                    {[34, 48, 41, 57, 62, 55, 70, 76, 68, 84, 90, 96].map((h, i) => (\n                      <motion.span key={i} className=\"flex-1 rounded-t-md\" style={{ background: i > 8 ? \"#60A5FA\" : p.bar }} initial={reduce ? false : { height: 0 }} animate={{ height: `${h}%` }} transition={{ delay: reduce ? 0 : i * 0.03, duration: 0.4 }} />\n                    ))}\n                  </div>\n                  <span className=\"absolute top-9 right-3 rounded-md px-2 py-1 text-[11px] font-medium text-white\" style={{ background: p.red }}>\n                    You are presenting\n                  </span>\n                </motion.div>\n                <div className=\"grid h-[92px] shrink-0 grid-flow-col gap-2 overflow-x-auto [grid-auto-columns:minmax(120px,1fr)]\">{everyone.map((x) => tile(x))}</div>\n              </>\n            ) : featured ? (\n              <>\n                <div className=\"flex min-h-[220px] flex-1\">{tile(featured, true)}</div>\n                <div className=\"grid h-[92px] shrink-0 grid-flow-col gap-2 overflow-x-auto [grid-auto-columns:minmax(120px,1fr)]\">{everyone.filter((x) => x.id !== featured.id).map((x) => tile(x))}</div>\n              </>\n            ) : (\n              <div className={cn(\"grid min-h-[320px] flex-1 auto-rows-fr gap-2.5\", gridCols)}>{everyone.map((x) => tile(x))}</div>\n            )}\n          </div>\n        </LayoutGroup>\n\n        {/* Side panel */}\n        <AnimatePresence initial={false}>\n          {panel && (\n            <motion.aside\n              key=\"panel\"\n              initial={reduce ? false : { opacity: 0, x: 16 }}\n              animate={{ opacity: 1, x: 0 }}\n              exit={reduce ? undefined : { opacity: 0, x: 16 }}\n              transition={{ duration: 0.18 }}\n              className=\"absolute inset-y-0 right-3 z-10 flex w-[min(300px,calc(100%-24px))] flex-col rounded-2xl border @[860px]:relative @[860px]:right-0 @[860px]:w-[280px]\"\n              style={{ background: p.panel, borderColor: p.border }}\n              aria-labelledby={`${uid}-ph`}\n            >\n              <div className=\"flex items-center justify-between border-b px-4 py-3\" style={{ borderColor: p.border }}>\n                <h3 id={`${uid}-ph`} className=\"m-0 text-[13.5px] font-semibold\">\n                  {panel === \"chat\" ? \"Chat\" : `People (${everyone.length})`}\n                </h3>\n                <button type=\"button\" onClick={() => setPanel(null)} aria-label=\"Close panel\" className={cn(\"grid h-7 w-7 cursor-pointer place-items-center rounded-md border-0 bg-transparent text-[16px]\", focus)} style={{ color: p.muted, ...ring }}>\n                  ×\n                </button>\n              </div>\n              {panel === \"chat\" ? (\n                <>\n                  <ol className=\"m-0 flex min-h-0 flex-1 list-none flex-col gap-3 overflow-y-auto p-4\" aria-live=\"polite\">\n                    <AnimatePresence initial={false}>\n                      {chat.map((m) => (\n                        <motion.li key={m.id} initial={reduce ? false : { opacity: 0, y: 6 }} animate={{ opacity: 1, y: 0 }} className={cn(\"flex max-w-[85%] flex-col\", m.who === you && \"self-end items-end\")}>\n                          <span className=\"text-[11px]\" style={{ color: p.faint }}>\n                            {m.who === you ? \"You\" : m.who} · {m.at}\n                          </span>\n                          <span className=\"mt-0.5 rounded-xl px-3 py-1.5 text-[13px] leading-[1.45]\" style={{ background: m.who === you ? p.on : p.bar, color: m.who === you ? p.onText : p.text }}>\n                            {m.text}\n                          </span>\n                        </motion.li>\n                      ))}\n                    </AnimatePresence>\n                  </ol>\n                  <form\n                    onSubmit={(e) => {\n                      e.preventDefault();\n                      send();\n                    }}\n                    className=\"flex gap-2 border-t p-3\"\n                    style={{ borderColor: p.border }}\n                  >\n                    <label htmlFor={`${uid}-msg`} className=\"sr-only\">\n                      Message everyone\n                    </label>\n                    <input id={`${uid}-msg`} ref={focusOnce} value={draft} onChange={(e) => setDraft(e.target.value)} placeholder=\"Message everyone\" autoComplete=\"off\" className={cn(\"h-9 min-w-0 flex-1 rounded-lg border px-3 text-[13px]\", focus)} style={{ borderColor: p.border, background: p.bg, color: p.text, ...ring }} />\n                    <button type=\"submit\" disabled={!draft.trim()} className={cn(\"h-9 cursor-pointer rounded-lg border-0 px-3 text-[12.5px] font-medium disabled:opacity-40\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                      Send\n                    </button>\n                  </form>\n                </>\n              ) : (\n                <ul className=\"m-0 flex list-none flex-col gap-1 overflow-y-auto p-2\">\n                  {everyone.map((x) => (\n                    <li key={x.id} className=\"flex items-center gap-2.5 rounded-lg px-2 py-1.5\">\n                      <span className=\"grid h-8 w-8 shrink-0 place-items-center rounded-full text-[11px] font-semibold text-white\" style={{ background: `linear-gradient(135deg, ${x.colors[0]}, ${x.colors[1]})` }}>\n                        {x.id === \"you\" ? \"Y\" : initials(x.name)}\n                      </span>\n                      <span className=\"min-w-0 flex-1\">\n                        <span className=\"block truncate text-[13px]\">{x.id === \"you\" ? youLabel : x.name}</span>\n                        <span className=\"block text-[11.5px]\" style={{ color: p.faint }}>\n                          {x.role ?? (x.id === \"you\" && hand ? \"Hand raised\" : speakerId === x.id ? \"Speaking\" : \"Participant\")}\n                        </span>\n                      </span>\n                      <span style={{ color: x.muted ? p.red : p.faint }} aria-label={x.muted ? \"Muted\" : \"Mic on\"}>\n                        <Svg d={x.muted ? ICON.micOff : ICON.mic} size={15} />\n                      </span>\n                    </li>\n                  ))}\n                </ul>\n              )}\n            </motion.aside>\n          )}\n        </AnimatePresence>\n      </div>\n\n      {/* Controls */}\n      <div className=\"relative flex items-center justify-center gap-2 border-t px-3 py-3 @[640px]:gap-2.5\" style={{ borderColor: p.border }}>\n        <button type=\"button\" onClick={() => setMuted((m) => !m)} aria-pressed={muted} aria-label={muted ? \"Unmute (M)\" : \"Mute (M)\"} title={muted ? \"Unmute (M)\" : \"Mute (M)\"} className={ctrl} style={{ background: muted ? p.red : p.btn, color: muted ? \"#fff\" : p.text, ...ring }}>\n          <Svg d={muted ? ICON.micOff : ICON.mic} />\n        </button>\n        <button type=\"button\" onClick={() => setCamOn((c) => !c)} aria-pressed={!camOn} aria-label={camOn ? \"Turn camera off (V)\" : \"Turn camera on (V)\"} title={camOn ? \"Camera off (V)\" : \"Camera on (V)\"} className={ctrl} style={{ background: camOn ? p.btn : p.red, color: camOn ? p.text : \"#fff\", ...ring }}>\n          <Svg d={camOn ? ICON.cam : ICON.camOff} />\n        </button>\n        <button type=\"button\" onClick={() => setSharing((s) => !s)} aria-pressed={sharing} aria-label={sharing ? \"Stop presenting\" : \"Present screen\"} className={cn(ctrl, \"hidden @[480px]:grid\")} style={{ background: sharing ? \"#60A5FA\" : p.btn, color: sharing ? \"#0A0A0A\" : p.text, ...ring }}>\n          <Svg d={ICON.screen} />\n        </button>\n        <button type=\"button\" onClick={() => setHand((h) => !h)} aria-pressed={hand} aria-label={hand ? \"Lower hand (H)\" : \"Raise hand (H)\"} className={ctrl} style={{ background: hand ? p.amber : p.btn, color: hand ? \"#0A0A0A\" : p.text, ...ring }}>\n          <Svg d={ICON.hand} />\n        </button>\n        <div className=\"relative\">\n          <button type=\"button\" onClick={() => setReactOpen((o) => !o)} aria-expanded={reactOpen} aria-label=\"Send a reaction\" className={ctrl} style={{ background: reactOpen ? p.on : p.btn, color: reactOpen ? p.onText : p.text, ...ring }}>\n            <Svg d={ICON.smile} />\n          </button>\n          <AnimatePresence>\n            {reactOpen && (\n              <motion.div key=\"reactions\" role=\"menu\" aria-label=\"Reactions\" initial={reduce ? false : { opacity: 0, y: 8, scale: 0.95 }} animate={{ opacity: 1, y: 0, scale: 1 }} exit={reduce ? undefined : { opacity: 0, y: 8, scale: 0.95 }} className=\"absolute bottom-full left-1/2 z-20 mb-2 flex -translate-x-1/2 gap-1 rounded-full border p-1.5 shadow-xl\" style={{ background: p.panel, borderColor: p.border }}>\n                {REACTIONS.map((e, i) => (\n                  <motion.button key={e} type=\"button\" role=\"menuitem\" ref={i === 0 ? focusOnce : undefined} onClick={() => react(e)} whileHover={reduce ? undefined : { scale: 1.25, y: -2 }} className={cn(\"grid h-9 w-9 cursor-pointer place-items-center rounded-full border-0 bg-transparent text-[20px]\", focus)} style={ring} aria-label={`React ${e}`}>\n                    {e}\n                  </motion.button>\n                ))}\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n        <span className=\"mx-1 hidden h-6 w-px @[560px]:block\" style={{ background: p.border }} aria-hidden=\"true\" />\n        <button type=\"button\" onClick={() => togglePanel(\"chat\")} aria-pressed={panel === \"chat\"} aria-label=\"Chat\" className={ctrl} style={{ background: panel === \"chat\" ? p.on : p.btn, color: panel === \"chat\" ? p.onText : p.text, ...ring }}>\n          <Svg d={ICON.chat} />\n        </button>\n        <button type=\"button\" onClick={() => togglePanel(\"people\")} aria-pressed={panel === \"people\"} aria-label=\"People\" className={cn(ctrl, \"hidden @[400px]:grid\")} style={{ background: panel === \"people\" ? p.on : p.btn, color: panel === \"people\" ? p.onText : p.text, ...ring }}>\n          <Svg d={ICON.people} />\n          <span className=\"absolute -top-0.5 -right-0.5 grid h-4 min-w-4 place-items-center rounded-full px-1 text-[10px] font-semibold\" style={{ background: p.on, color: p.onText }}>\n            {everyone.length}\n          </span>\n        </button>\n        <button\n          type=\"button\"\n          onClick={() => {\n            setLeft(true);\n            setPanel(null);\n            onLeave?.();\n          }}\n          aria-label=\"Leave call\"\n          className={cn(\"ml-1 flex h-11 cursor-pointer items-center gap-2 rounded-full border-0 px-4 text-[13px] font-medium text-white @[640px]:h-12 @[640px]:px-5\", focus)}\n          style={{ background: p.red, ...ring }}\n        >\n          <Svg d={ICON.phone} />\n          <span className=\"hidden @[560px]:inline\">Leave</span>\n        </button>\n      </div>\n    </section>\n  );\n}\n\nexport default VideoCallUI;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}