{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "account-menu-dropdown",
  "title": "Account Menu Dropdown",
  "description": "The menu behind an app's avatar, done properly: profile header with plan, a custom status with emoji, availability that recolors the avatar dot, a workspace switcher, shortcuts for each item, an appearance switch that really changes the theme, a confirm step before signing out, and full keyboard support with type-ahead.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/account-menu-dropdown/account-menu-dropdown.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, 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 Presence = \"online\" | \"away\" | \"dnd\";\ntype Appearance = \"light\" | \"dark\" | \"system\";\n\nexport interface AccountMenuDropdownProps {\n  user?: { name: string; email: string; plan: string };\n  workspaces?: { id: string; name: string; color: string; role: string }[];\n  defaultOpen?: boolean;\n  onAction?: (action: string) => void;\n  onSignOut?: () => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.62)\", faint: \"rgba(245,244,241,0.36)\", bar: \"#0E0E0E\", menu: \"#161616\", border: \"rgba(255,255,255,0.09)\", hover: \"rgba(255,255,255,0.06)\", input: \"#0F0F0F\", on: \"#F5F4F1\", onText: \"#0A0A0A\", red: \"#F87171\", ring: \"rgba(245,244,241,0.6)\", ghost: \"rgba(255,255,255,0.035)\" },\n  light: { bg: \"#F4F4F1\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.4)\", bar: \"#FFFFFF\", menu: \"#FFFFFF\", border: \"rgba(10,10,10,0.09)\", hover: \"rgba(10,10,10,0.05)\", input: \"#FAFAF8\", on: \"#0A0A0A\", onText: \"#FAFAF8\", red: \"#DC2626\", ring: \"rgba(10,10,10,0.5)\", ghost: \"rgba(10,10,10,0.04)\" },\n};\nconst PRESENCE: { id: Presence; label: string; color: string }[] = [\n  { id: \"online\", label: \"Online\", color: \"#22C55E\" },\n  { id: \"away\", label: \"Away\", color: \"#F59E0B\" },\n  { id: \"dnd\", label: \"Do not disturb\", color: \"#EF4444\" },\n];\nconst WORKSPACES = [\n  { id: \"nexora\", name: \"Nexora\", color: \"#6366F1\", role: \"Owner\" },\n  { id: \"halden\", name: \"Halden Studio\", color: \"#10B981\", role: \"Admin\" },\n  { id: \"kestrel\", name: \"Kestrel Labs\", color: \"#F59E0B\", role: \"Member\" },\n];\nconst EMOJI = [\"🗓️\", \"🎧\", \"🌴\", \"🤒\", \"🚆\"];\nconst ITEMS: { id: string; label: string; icon: string; kbd?: string }[] = [\n  { id: \"profile\", label: \"Profile\", icon: \"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 9a7 7 0 0 1 14 0\", kbd: \"⇧⌘P\" },\n  { id: \"settings\", label: \"Settings\", icon: \"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.5 7.5 0 0 0-2-1.2L14.5 3h-4l-.4 2.6a7.5 7.5 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.5 7.5 0 0 0 2 1.2l.4 2.6h4l.4-2.6a7.5 7.5 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6c.1-.4.1-.8.1-1.2Z\", kbd: \"⌘,\" },\n  { id: \"billing\", label: \"Billing\", icon: \"M3 6h18v12H3zM3 10h18M7 15h3\" },\n  { id: \"shortcuts\", label: \"Keyboard shortcuts\", icon: \"M3 7h18v10H3zM7 11h.01M11 11h.01M15 11h.01M8 14h8\", kbd: \"?\" },\n  { id: \"help\", label: \"Help & feedback\", icon: \"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2.5-11a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V15m0 2.5h.01\" },\n];\n\nexport function AccountMenuDropdown({ user = { name: \"Lena Brandt\", email: \"lena@nexora.io\", plan: \"Team\" }, workspaces = WORKSPACES, defaultOpen = true, onAction, onSignOut, theme = \"dark\", className }: AccountMenuDropdownProps) {\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [appearance, setAppearance] = React.useState<Appearance>(theme);\n  const p = PALETTES[appearance === \"system\" ? theme : appearance];\n  const [open, setOpen] = React.useState(defaultOpen);\n  const [presence, setPresence] = React.useState<Presence>(\"online\");\n  const [status, setStatus] = React.useState({ emoji: \"🗓️\", text: \"In meetings until 3pm\" });\n  const [editingStatus, setEditingStatus] = React.useState(false);\n  const [draft, setDraft] = React.useState(status);\n  const [ws, setWs] = React.useState(workspaces[0].id);\n  const [wsOpen, setWsOpen] = React.useState(false);\n  const [confirmOut, setConfirmOut] = React.useState(false);\n  const [signedOut, setSignedOut] = React.useState(false);\n  const [toast, setToast] = React.useState<string | null>(null);\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const menuRef = React.useRef<HTMLDivElement>(null);\n  const triggerRef = React.useRef<HTMLButtonElement>(null);\n  const typeahead = React.useRef({ text: \"\", at: 0 });\n  const focusOnce = React.useCallback((el: HTMLElement | null) => el?.focus({ preventScroll: true }), []);\n\n  const current = workspaces.find((w) => w.id === ws)!;\n  const pres = PRESENCE.find((x) => x.id === presence)!;\n\n  React.useEffect(() => {\n    if (!open) return;\n    const onDown = (e: PointerEvent) => {\n      if (rootRef.current?.contains(e.target as Node)) return;\n      setOpen(false);\n      setWsOpen(false);\n      setEditingStatus(false);\n      setConfirmOut(false);\n    };\n    document.addEventListener(\"pointerdown\", onDown);\n    return () => document.removeEventListener(\"pointerdown\", onDown);\n  }, [open]);\n  React.useEffect(() => {\n    if (!toast) return;\n    const t = setTimeout(() => setToast(null), 2000);\n    return () => clearTimeout(t);\n  }, [toast]);\n\n  function close(refocus = true) {\n    setOpen(false);\n    setWsOpen(false);\n    setEditingStatus(false);\n    setConfirmOut(false);\n    if (refocus) requestAnimationFrame(() => triggerRef.current?.focus());\n  }\n  const act = (id: string, label: string) => {\n    onAction?.(id);\n    setToast(`${label} opened`);\n    close();\n  };\n  const onMenuKey = (e: React.KeyboardEvent) => {\n    if ((e.target as HTMLElement).closest(\"input\")) {\n      if (e.key === \"Escape\") setEditingStatus(false);\n      return;\n    }\n    const items = [...(menuRef.current?.querySelectorAll<HTMLElement>(\"[data-item]:not([disabled])\") ?? [])];\n    const i = items.indexOf(document.activeElement as HTMLElement);\n    if (e.key === \"Escape\") {\n      e.preventDefault();\n      if (wsOpen) setWsOpen(false);\n      else close();\n    } else if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n      e.preventDefault();\n      items[(i + (e.key === \"ArrowDown\" ? 1 : -1) + items.length) % items.length]?.focus();\n    } else if (e.key === \"Home\" || e.key === \"End\") {\n      e.preventDefault();\n      items[e.key === \"Home\" ? 0 : items.length - 1]?.focus();\n    } else if (e.key.length === 1 && /\\S/.test(e.key)) {\n      const t = typeahead.current;\n      t.text = e.timeStamp - t.at < 600 ? t.text + e.key.toLowerCase() : e.key.toLowerCase();\n      t.at = e.timeStamp;\n      const hit = items.find((el, n) => n > i - (t.text.length > 1 ? 1 : 0) && (el.textContent ?? \"\").trim().toLowerCase().startsWith(t.text)) ?? items.find((el) => (el.textContent ?? \"\").trim().toLowerCase().startsWith(t.text));\n      hit?.focus();\n    }\n  };\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.menu } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const item = cn(\"flex w-full cursor-pointer items-center gap-2.5 rounded-lg border-0 bg-transparent px-2.5 py-2 text-left text-[13px] hover:bg-[var(--h)] focus-visible:bg-[var(--h)]\", \"outline-none\");\n  const sep = <div className=\"my-1 h-px\" style={{ background: p.border }} role=\"separator\" />;\n  const icon = (d: string) => (\n    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" style={{ color: p.muted }}>\n      <path d={d} />\n    </svg>\n  );\n  const avatar = (size: number) => (\n    <span className=\"relative grid shrink-0 place-items-center rounded-full font-semibold\" style={{ width: size, height: size, fontSize: size * 0.36, background: \"#60A5FA2e\", color: \"#60A5FA\" }}>\n      {user.name\n        .split(\" \")\n        .map((s) => s[0])\n        .join(\"\")}\n      <motion.span className=\"absolute -right-0.5 -bottom-0.5 rounded-full border-2\" style={{ width: size * 0.34, height: size * 0.34, borderColor: p.menu }} initial={false} animate={{ backgroundColor: pres.color }} />\n    </span>\n  );\n  const wsList = (\n    <div role=\"group\" aria-label=\"Workspaces\">\n      {workspaces.map((w) => (\n        <button\n          key={w.id}\n          type=\"button\"\n          role=\"menuitemradio\"\n          aria-checked={ws === w.id}\n          data-item\n          onClick={() => {\n            setWs(w.id);\n            setWsOpen(false);\n            setToast(`Switched to ${w.name}`);\n          }}\n          className={item}\n          style={{ color: p.text, [\"--h\" as string]: p.hover }}\n        >\n          <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-md text-[11px] font-semibold text-white\" style={{ background: w.color }}>\n            {w.name[0]}\n          </span>\n          <span className=\"min-w-0 flex-1\">\n            <span className=\"block truncate\">{w.name}</span>\n            <span className=\"block text-[11.5px]\" style={{ color: p.faint }}>\n              {w.role}\n            </span>\n          </span>\n          {ws === w.id && (\n            <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"m5 12.5 4.5 4.5L19 7.5\" />\n            </svg>\n          )}\n        </button>\n      ))}\n      <button type=\"button\" role=\"menuitem\" data-item onClick={() => act(\"new-workspace\", \"Create workspace\")} className={item} style={{ color: p.muted, [\"--h\" as string]: p.hover }}>\n        <span className=\"grid h-6 w-6 place-items-center rounded-md border border-dashed\" style={{ borderColor: p.border }}>\n          +\n        </span>\n        Create workspace\n      </button>\n    </div>\n  );\n\n  return (\n    <section className={cn(\"@container min-h-[640px] w-full transition-colors\", className)} style={{ background: p.bg, color: p.text }}>\n      {/* App bar */}\n      <div className=\"flex h-14 items-center gap-3 border-b px-4 @[640px]:px-6\" style={{ borderColor: p.border, background: p.bar }}>\n        <span className=\"grid h-7 w-7 place-items-center rounded-md text-[12px] font-bold text-white\" style={{ background: current.color }}>\n          {current.name[0]}\n        </span>\n        <span className=\"text-[14px] font-semibold\">{current.name}</span>\n        <div ref={rootRef} className=\"relative ml-auto\">\n          <button ref={triggerRef} type=\"button\" onClick={() => {\n              if (open) close();\n              else {\n                setOpen(true);\n                requestAnimationFrame(() => menuRef.current?.querySelector<HTMLElement>(\"[data-item]\")?.focus());\n              }\n            }} aria-haspopup=\"menu\" aria-expanded={open} aria-label={`Account menu, ${pres.label}`} className={cn(\"flex cursor-pointer items-center gap-2 rounded-full border-0 bg-transparent p-0.5 pr-2\", focus)} style={{ color: p.text, ...ring }}>\n            {avatar(32)}\n            <span className=\"hidden max-w-[160px] truncate text-[12.5px] @[560px]:inline\" style={{ color: p.muted }}>\n              {status.emoji} {status.text}\n            </span>\n          </button>\n\n          <AnimatePresence>\n            {open && (\n              <motion.div\n                key=\"menu\"\n                ref={menuRef}\n                role=\"menu\"\n                aria-label=\"Account\"\n                onKeyDown={onMenuKey}\n                initial={reduce ? false : { opacity: 0, y: -6, scale: 0.97 }}\n                animate={{ opacity: 1, y: 0, scale: 1 }}\n                exit={reduce ? undefined : { opacity: 0, y: -6, scale: 0.97 }}\n                transition={{ duration: 0.15 }}\n                className=\"absolute top-full right-0 z-30 mt-2 w-[min(300px,calc(100cqw-32px))] origin-top-right rounded-2xl border p-1.5 shadow-[0_24px_60px_-20px_rgba(0,0,0,0.6)]\"\n                style={{ background: p.menu, borderColor: p.border, color: p.text }}\n              >\n                {signedOut ? (\n                  <div className=\"px-3 py-6 text-center\" role=\"status\">\n                    <p className=\"m-0 text-[13.5px] font-medium\">Signed out</p>\n                    <p className=\"m-0 mt-1 text-[12.5px]\" style={{ color: p.muted }}>\n                      See you soon, {user.name.split(\" \")[0]}.\n                    </p>\n                    <button type=\"button\" ref={focusOnce} onClick={() => setSignedOut(false)} className={cn(\"mt-4 h-8 cursor-pointer rounded-lg border-0 px-3 text-[12.5px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                      Sign back in\n                    </button>\n                  </div>\n                ) : (\n                  <>\n                    {/* Header */}\n                    <div className=\"flex items-center gap-3 px-2.5 pt-2 pb-2.5\">\n                      {avatar(40)}\n                      <div className=\"min-w-0 flex-1\">\n                        <p className=\"m-0 flex items-center gap-1.5 text-[13.5px] font-semibold\">\n                          <span className=\"truncate\">{user.name}</span>\n                          <span className=\"rounded-full px-1.5 py-px text-[10.5px] font-medium\" style={{ background: \"#60A5FA22\", color: \"#60A5FA\" }}>\n                            {user.plan}\n                          </span>\n                        </p>\n                        <p className=\"m-0 truncate text-[12px]\" style={{ color: p.faint }}>\n                          {user.email}\n                        </p>\n                      </div>\n                    </div>\n\n                    {/* Status */}\n                    <AnimatePresence mode=\"wait\" initial={false}>\n                      {editingStatus ? (\n                        <motion.form\n                          key=\"edit\"\n                          initial={reduce ? false : { opacity: 0 }}\n                          animate={{ opacity: 1 }}\n                          className=\"mx-1 rounded-xl border p-2\"\n                          style={{ borderColor: p.border }}\n                          onSubmit={(e) => {\n                            e.preventDefault();\n                            setStatus(draft);\n                            setEditingStatus(false);\n                          }}\n                        >\n                          <div className=\"flex gap-1\" role=\"radiogroup\" aria-label=\"Status emoji\">\n                            {EMOJI.map((em) => (\n                              <button key={em} type=\"button\" role=\"radio\" aria-checked={draft.emoji === em} onClick={() => setDraft((d) => ({ ...d, emoji: em }))} className={cn(\"grid h-8 w-8 cursor-pointer place-items-center rounded-lg border-0 text-[15px]\", focus)} style={{ background: draft.emoji === em ? p.hover : \"transparent\", ...ring }} aria-label={em}>\n                                {em}\n                              </button>\n                            ))}\n                          </div>\n                          <label htmlFor={`${uid}-st`} className=\"sr-only\">\n                            Status\n                          </label>\n                          <input id={`${uid}-st`} ref={focusOnce} value={draft.text} onChange={(e) => setDraft((d) => ({ ...d, text: e.target.value }))} maxLength={60} placeholder=\"What's your status?\" className={cn(\"mt-2 h-8 w-full rounded-lg border px-2.5 text-[12.5px]\", focus)} style={{ borderColor: p.border, background: p.input, color: p.text, ...ring }} />\n                          <div className=\"mt-2 flex justify-between gap-2\">\n                            <button\n                              type=\"button\"\n                              onClick={() => {\n                                setStatus({ emoji: \"\", text: \"\" });\n                                setDraft({ emoji: EMOJI[0], text: \"\" });\n                                setEditingStatus(false);\n                              }}\n                              className={cn(\"h-7 cursor-pointer rounded-md border-0 bg-transparent px-2 text-[12px]\", focus)}\n                              style={{ color: p.muted, ...ring }}\n                            >\n                              Clear\n                            </button>\n                            <button type=\"submit\" className={cn(\"h-7 cursor-pointer rounded-md border-0 px-2.5 text-[12px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                              Save\n                            </button>\n                          </div>\n                        </motion.form>\n                      ) : (\n                        <motion.button\n                          key=\"show\"\n                          type=\"button\"\n                          role=\"menuitem\"\n                          data-item\n                          initial={reduce ? false : { opacity: 0 }}\n                          animate={{ opacity: 1 }}\n                          onClick={() => {\n                            setDraft(status.text ? status : { emoji: EMOJI[0], text: \"\" });\n                            setEditingStatus(true);\n                          }}\n                          className={cn(item, \"mx-1 w-[calc(100%-8px)] border\")}\n                          style={{ borderColor: p.border, color: status.text ? p.text : p.faint, [\"--h\" as string]: p.hover }}\n                        >\n                          <span className=\"text-[15px]\" aria-hidden=\"true\">\n                            {status.text ? status.emoji : \"💬\"}\n                          </span>\n                          <span className=\"truncate\">{status.text || \"Set a status\"}</span>\n                        </motion.button>\n                      )}\n                    </AnimatePresence>\n                    <div role=\"group\" aria-label=\"Availability\" className=\"mt-1.5 flex gap-1 px-1\">\n                      {PRESENCE.map((x) => (\n                        <button key={x.id} type=\"button\" role=\"menuitemradio\" aria-checked={presence === x.id} data-item onClick={() => setPresence(x.id)} className={cn(\"relative flex h-7 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-lg border-0 bg-transparent px-1 text-[11.5px] whitespace-nowrap\", \"outline-none focus-visible:ring-2\")} style={{ color: presence === x.id ? p.text : p.muted, ...ring }}>\n                          {presence === x.id && <motion.span layoutId={`${uid}-pres`} className=\"absolute inset-0 rounded-lg\" style={{ background: p.hover }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 520, damping: 38 }} />}\n                          <span className=\"relative h-2 w-2 rounded-full\" style={{ background: x.color }} />\n                          <span className=\"relative\">{x.id === \"dnd\" ? \"Busy\" : x.label}</span>\n                        </button>\n                      ))}\n                    </div>\n                    {sep}\n\n                    {/* Workspace */}\n                    <div className=\"relative\">\n                      <button type=\"button\" role=\"menuitem\" data-item aria-haspopup=\"menu\" aria-expanded={wsOpen} onClick={() => setWsOpen((o) => !o)} onKeyDown={(e) => e.key === \"ArrowRight\" && setWsOpen(true)} className={item} style={{ color: p.text, [\"--h\" as string]: p.hover }}>\n                        <span className=\"grid h-[15px] w-[15px] place-items-center rounded-[4px] text-[9px] font-bold text-white\" style={{ background: current.color }}>\n                          {current.name[0]}\n                        </span>\n                        <span className=\"min-w-0 flex-1 truncate\">{current.name}</span>\n                        <span className=\"text-[11.5px]\" style={{ color: p.faint }}>\n                          Switch\n                        </span>\n                        <motion.svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" animate={{ rotate: wsOpen ? 90 : 0 }} aria-hidden=\"true\" style={{ color: p.faint }}>\n                          <path d=\"m9 6 6 6-6 6\" />\n                        </motion.svg>\n                      </button>\n                      <AnimatePresence initial={false}>\n                        {wsOpen && (\n                          <motion.div key=\"ws\" initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden pl-3\">\n                            {wsList}\n                          </motion.div>\n                        )}\n                      </AnimatePresence>\n                    </div>\n                    {sep}\n\n                    {ITEMS.map((it) => (\n                      <button key={it.id} type=\"button\" role=\"menuitem\" data-item onClick={() => act(it.id, it.label)} className={item} style={{ color: p.text, [\"--h\" as string]: p.hover }}>\n                        {icon(it.icon)}\n                        <span className=\"flex-1\">{it.label}</span>\n                        {it.kbd && (\n                          <kbd className=\"font-sans text-[11px]\" style={{ color: p.faint }}>\n                            {it.kbd}\n                          </kbd>\n                        )}\n                      </button>\n                    ))}\n                    {sep}\n                    <div className=\"flex items-center justify-between gap-2 px-2.5 py-1.5\">\n                      <span className=\"text-[13px]\" style={{ color: p.muted }}>\n                        Appearance\n                      </span>\n                      <div role=\"radiogroup\" aria-label=\"Appearance\" className=\"flex rounded-lg p-0.5\" style={{ background: p.ghost }}>\n                        {([\"light\", \"dark\", \"system\"] as const).map((a) => (\n                          <button key={a} type=\"button\" role=\"radio\" aria-checked={appearance === a} data-item onClick={() => setAppearance(a)} className={cn(\"relative h-6 cursor-pointer rounded-md border-0 bg-transparent px-2 text-[11.5px] capitalize\", \"outline-none focus-visible:ring-2\")} style={{ color: appearance === a ? p.text : p.muted, ...ring }}>\n                            {appearance === a && <motion.span layoutId={`${uid}-app`} className=\"absolute inset-0 rounded-md border\" style={{ background: p.menu, borderColor: p.border }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 520, damping: 38 }} />}\n                            <span className=\"relative\">{a}</span>\n                          </button>\n                        ))}\n                      </div>\n                    </div>\n                    {sep}\n                    <AnimatePresence mode=\"wait\" initial={false}>\n                      {confirmOut ? (\n                        <motion.div key=\"confirm\" initial={reduce ? false : { opacity: 0 }} animate={{ opacity: 1 }} className=\"flex items-center justify-between gap-2 px-2.5 py-1.5\" role=\"alertdialog\" aria-label=\"Sign out?\">\n                          <span className=\"text-[12.5px]\" style={{ color: p.muted }}>\n                            Sign out of all workspaces?\n                          </span>\n                          <span className=\"flex gap-1\">\n                            <button type=\"button\" data-item ref={focusOnce} onClick={() => setConfirmOut(false)} className={cn(\"h-7 cursor-pointer rounded-md border bg-transparent px-2 text-[12px]\", focus)} style={{ borderColor: p.border, color: p.text, ...ring }}>\n                              Cancel\n                            </button>\n                            <button\n                              type=\"button\"\n                              data-item\n                              onClick={() => {\n                                setConfirmOut(false);\n                                setSignedOut(true);\n                                onSignOut?.();\n                              }}\n                              className={cn(\"h-7 cursor-pointer rounded-md border-0 px-2 text-[12px] font-medium text-white\", focus)}\n                              style={{ background: p.red, ...ring }}\n                            >\n                              Sign out\n                            </button>\n                          </span>\n                        </motion.div>\n                      ) : (\n                        <motion.button key=\"out\" type=\"button\" role=\"menuitem\" data-item initial={reduce ? false : { opacity: 0 }} animate={{ opacity: 1 }} onClick={() => setConfirmOut(true)} className={item} style={{ color: p.red, [\"--h\" as string]: p.hover }}>\n                          <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                            <path d=\"M15 4h4v16h-4M10 8l-4 4 4 4M6 12h10\" />\n                          </svg>\n                          Sign out\n                        </motion.button>\n                      )}\n                    </AnimatePresence>\n                  </>\n                )}\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n      </div>\n\n      {/* Page body placeholder */}\n      <div className=\"grid grid-cols-1 gap-4 p-4 @[640px]:grid-cols-3 @[640px]:p-6\" aria-hidden=\"true\">\n        {[0, 1, 2, 3, 4, 5].map((i) => (\n          <div key={i} className={cn(\"h-28 rounded-xl\", i === 0 && \"@[640px]:col-span-2\")} style={{ background: p.ghost }} />\n        ))}\n      </div>\n      <AnimatePresence>\n        {toast && (\n          <motion.div key={toast} role=\"status\" initial={reduce ? false : { opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} className=\"mx-auto w-fit rounded-full border px-3.5 py-1.5 text-[12.5px]\" style={{ background: p.menu, borderColor: p.border }}>\n            {toast}\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </section>\n  );\n}\n\nexport default AccountMenuDropdown;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}