{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "nav-app-header",
  "type": "registry:component",
  "title": "Nav App Header",
  "description": "A light app header with a workspace breadcrumb and live status, a search button with a Cmd K shortcut, notifications and an account menu, over a row of tabs with counts and a sliding underline.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "navigation",
    "app header",
    "breadcrumb",
    "tabs",
    "command k",
    "user menu",
    "light"
  ],
  "docs": "https://hyperblur.dev/effects/nav-app-header",
  "files": [
    {
      "path": "registry/hyperblur/nav-app-header.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/nav-app-header.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface NavAppHeaderCrumb {\n  label: string;\n  href: string;\n}\n\nexport interface NavAppHeaderTab {\n  label: string;\n  href: string;\n  count?: number;\n}\n\nexport interface NavAppHeaderMenuItem {\n  label: string;\n  href?: string;\n  shortcut?: string;\n  danger?: boolean;\n}\n\nexport interface NavAppHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, \"children\"> {\n  breadcrumbs?: NavAppHeaderCrumb[];\n  status?: string | null;\n  tabs?: NavAppHeaderTab[];\n  activeTab?: number;\n  defaultActiveTab?: number;\n  onTabChange?: (index: number, tab: NavAppHeaderTab) => void;\n  searchPlaceholder?: string;\n  onSearch?: () => void;\n  notifications?: number;\n  onNotificationsClick?: () => void;\n  user?: { name: string; email: string } | null;\n  menu?: NavAppHeaderMenuItem[];\n  defaultMenuOpen?: boolean;\n  onMenuItemSelect?: (item: NavAppHeaderMenuItem) => void;\n  accent?: string;\n  showBackdrop?: boolean;\n}\n\nconst css = `\n.hb-yh5 {\n  --hb-yh5-accent: #2f7bff;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #fff;\n  color: #171717;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yh5 *, .hb-yh5 *::before, .hb-yh5 *::after { box-sizing: border-box; }\n.hb-yh5[data-backdrop=\"true\"] { min-height: 600px; overflow: hidden; background: #fafaf8; }\n.hb-yh5-bar { position: relative; z-index: 3; border-bottom: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }\n.hb-yh5-top { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 20px; }\n.hb-yh5-logo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #171717, #3f3f46); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.2); text-decoration: none; }\n.hb-yh5-logo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yh5-crumbs { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; }\n.hb-yh5-cr { display: flex; align-items: center; min-width: 0; opacity: 0; transform: translateX(-6px); animation: hb-yh5-in .5s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--hb-yh5-i) * 80ms); }\n.hb-yh5-sl { flex: none; width: 18px; height: 22px; color: #d4d4d4; }\n.hb-yh5-sl path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }\n.hb-yh5-cl {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  height: 32px;\n  min-width: 0;\n  padding: 0 8px;\n  border-radius: 8px;\n  color: #525252;\n  font-size: 14px;\n  font-weight: 500;\n  white-space: nowrap;\n  text-decoration: none;\n  transition: background-color .15s ease, color .15s ease;\n}\n.hb-yh5-cl:hover { background: #f4f4f5; color: #171717; }\n.hb-yh5-cl[aria-current=\"page\"] { color: #171717; font-weight: 600; }\n.hb-yh5-cl span { overflow: hidden; text-overflow: ellipsis; }\n.hb-yh5-ws { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; font-size: 10px; font-weight: 700; }\n.hb-yh5-ud { flex: none; width: 12px; height: 12px; color: #a3a3a3; }\n.hb-yh5-ud path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yh5-status { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 22px; margin-left: 4px; padding: 0 8px; border: 1px solid rgba(16,185,129,.25); border-radius: 999px; background: rgba(16,185,129,.08); color: #047857; font-size: 11.5px; font-weight: 600; }\n.hb-yh5-status i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #10b981; }\n.hb-yh5-status i::after { content: \"\"; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid #10b981; animation: hb-yh5-ping 1.8s ease-out infinite; }\n.hb-yh5-sp { flex: 1; }\n.hb-yh5-search {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  flex: none;\n  width: 260px;\n  height: 36px;\n  padding: 0 6px 0 12px;\n  border: 1px solid rgba(0,0,0,.09);\n  border-radius: 10px;\n  background: #fafafa;\n  color: #8a8a8a;\n  font: inherit;\n  font-size: 13.5px;\n  text-align: left;\n  cursor: text;\n  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;\n}\n.hb-yh5-search:hover { border-color: rgba(0,0,0,.16); background: #fff; }\n.hb-yh5-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.hb-yh5-st { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-yh5-kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border: 1px solid rgba(0,0,0,.1); border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #737373; font-size: 11px; font-weight: 600; }\n.hb-yh5-icon {\n  position: relative;\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 36px;\n  height: 36px;\n  border: 1px solid rgba(0,0,0,.09);\n  border-radius: 10px;\n  background: #fff;\n  color: #525252;\n  cursor: pointer;\n  transition: background-color .15s ease, color .15s ease;\n}\n.hb-yh5-icon:hover { background: #f4f4f5; color: #171717; }\n.hb-yh5-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yh5-icon b { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; background: var(--hb-yh5-accent); color: #fff; font-size: 9px; font-weight: 700; line-height: 11px; text-align: center; }\n.hb-yh5-me { position: relative; flex: none; }\n.hb-yh5-av { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08); transition: transform .15s ease; }\n.hb-yh5-av:active { transform: scale(.94); }\n.hb-yh5-menu {\n  position: absolute;\n  z-index: 5;\n  top: calc(100% + 10px);\n  right: 0;\n  width: 240px;\n  padding: 6px;\n  border: 1px solid rgba(0,0,0,.08);\n  border-radius: 14px;\n  background: #fff;\n  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 20px 50px -12px rgba(0,0,0,.25);\n  transform-origin: calc(100% - 16px) 0;\n  animation: hb-yh5-pop .22s cubic-bezier(.2,.9,.3,1.2) both;\n}\n.hb-yh5-mh { padding: 10px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,.06); }\n.hb-yh5-mn { font-size: 13.5px; font-weight: 600; }\n.hb-yh5-me2 { margin-top: 2px; color: #737373; font-size: 12px; }\n.hb-yh5-mi { display: flex; align-items: center; width: 100%; height: 34px; margin: 0; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #262626; font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; }\n.hb-yh5-mi:hover, .hb-yh5-mi:focus-visible { background: #f4f4f5; outline: none; }\n.hb-yh5-mi[data-danger=\"true\"] { color: #dc2626; }\n.hb-yh5-mi[data-danger=\"true\"]:hover, .hb-yh5-mi[data-danger=\"true\"]:focus-visible { background: #fef2f2; }\n.hb-yh5-ms { margin-left: auto; color: #a3a3a3; font-size: 12px; }\n.hb-yh5-div { height: 1px; margin: 6px 4px; background: rgba(0,0,0,.06); }\n.hb-yh5-tabs { position: relative; display: flex; align-items: center; gap: 2px; height: 44px; margin: 0; padding: 0 12px; list-style: none; overflow-x: auto; scrollbar-width: none; }\n.hb-yh5-tabs::-webkit-scrollbar { display: none; }\n.hb-yh5-hov { position: absolute; top: 6px; left: 0; height: 32px; border-radius: 8px; background: #f4f4f5; opacity: 0; transform: translateX(var(--hb-yh5-hx, 0px)); width: var(--hb-yh5-hw, 0px); transition: transform .25s cubic-bezier(.3,1,.4,1), width .25s cubic-bezier(.3,1,.4,1), opacity .15s ease; pointer-events: none; list-style: none; }\n.hb-yh5-line { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: #171717; transform: translateX(var(--hb-yh5-lx, 0px)); width: var(--hb-yh5-lw, 0px); transition: transform .42s cubic-bezier(.4,1.4,.5,1), width .42s cubic-bezier(.4,1.4,.5,1); pointer-events: none; list-style: none; }\n.hb-yh5-line::after { content: \"\"; position: absolute; inset: -2px 30% auto; height: 4px; border-radius: 99px; background: var(--hb-yh5-accent); filter: blur(5px); opacity: .55; }\n.hb-yh5-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; color: #737373; font-size: 13.5px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: color .15s ease; }\n.hb-yh5-tab:hover, .hb-yh5-tab[aria-current=\"page\"] { color: #171717; }\n.hb-yh5-tab[aria-current=\"page\"] { font-weight: 600; }\n.hb-yh5-ct { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: #f0f0f0; color: #525252; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-yh5-tab[aria-current=\"page\"] .hb-yh5-ct { background: color-mix(in srgb, var(--hb-yh5-accent) 12%, #fff); color: var(--hb-yh5-accent); }\n.hb-yh5 a:focus-visible, .hb-yh5 button:focus-visible { outline: 2px solid var(--hb-yh5-accent); outline-offset: 2px; }\n.hb-yh5-page { position: relative; z-index: 1; padding: 28px 20px; opacity: .75; pointer-events: none; }\n.hb-yh5-ph { display: flex; justify-content: space-between; align-items: flex-end; max-width: 1120px; margin: 0 auto 20px; }\n.hb-yh5-pt { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }\n.hb-yh5-pd { margin-top: 4px; color: #8a8a8a; font-size: 13px; }\n.hb-yh5-pb { height: 34px; padding: 0 14px; border-radius: 9px; background: #171717; color: #fff; font-size: 13px; font-weight: 600; line-height: 34px; }\n.hb-yh5-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1120px; margin: 0 auto; }\n.hb-yh5-card { padding: 16px; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; background: #fff; }\n.hb-yh5-ck { color: #8a8a8a; font-size: 12px; }\n.hb-yh5-cv { margin-top: 6px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }\n.hb-yh5-cv em { margin-left: 6px; color: #059669; font-size: 12px; font-style: normal; font-weight: 600; }\n.hb-yh5-table { max-width: 1120px; margin: 14px auto 0; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; background: #fff; overflow: hidden; }\n.hb-yh5-tr { display: grid; grid-template-columns: 90px minmax(0, 1fr) 120px 90px; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-top: 1px solid rgba(0,0,0,.05); font-size: 13px; }\n.hb-yh5-tr:first-child { border-top: 0; color: #8a8a8a; font-size: 12px; background: #fafafa; }\n.hb-yh5-id { color: #8a8a8a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }\n.hb-yh5-tag { justify-self: start; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }\n.hb-yh5-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n@keyframes hb-yh5-in { to { opacity: 1; transform: none; } }\n@keyframes hb-yh5-ping { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }\n@keyframes hb-yh5-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }\n@container (max-width: 860px) {\n  .hb-yh5-search { width: 36px; padding: 0; justify-content: center; }\n  .hb-yh5-st, .hb-yh5-kbd { display: none; }\n  .hb-yh5-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n}\n@container (max-width: 600px) {\n  .hb-yh5-top { padding: 0 12px; gap: 6px; }\n  .hb-yh5-cr[data-mid=\"true\"] { display: none; }\n  .hb-yh5-status { display: none; }\n  .hb-yh5-tr { grid-template-columns: 70px minmax(0, 1fr) 80px; }\n  .hb-yh5-tr > :nth-child(3) { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yh5 *, .hb-yh5 *::before, .hb-yh5 *::after { animation: none !important; transition: none !important; }\n  .hb-yh5-cr { opacity: 1; transform: none; }\n}\n`;\n\nconst defaultCrumbs: NavAppHeaderCrumb[] = [\n  { label: \"Northwind\", href: \"#\" },\n  { label: \"Projects\", href: \"#\" },\n  { label: \"Atlas redesign\", href: \"#\" },\n];\n\nconst defaultTabs: NavAppHeaderTab[] = [\n  { label: \"Overview\", href: \"#\" },\n  { label: \"Issues\", href: \"#\", count: 24 },\n  { label: \"Pull requests\", href: \"#\", count: 6 },\n  { label: \"Deployments\", href: \"#\" },\n  { label: \"Analytics\", href: \"#\" },\n  { label: \"Settings\", href: \"#\" },\n];\n\nconst defaultMenu: NavAppHeaderMenuItem[] = [\n  { label: \"Your profile\", href: \"#\", shortcut: \"G P\" },\n  { label: \"Workspace settings\", href: \"#\", shortcut: \"G S\" },\n  { label: \"Invite teammates\", href: \"#\" },\n  { label: \"Changelog\", href: \"#\" },\n  { label: \"Log out\", danger: true },\n];\n\nconst rows = [\n  { id: \"ATL-482\", t: \"Empty state for archived boards\", s: \"In review\", c: \"#7c3aed\", bg: \"#f5f3ff\", who: \"MK\" },\n  { id: \"ATL-479\", t: \"Keyboard shortcuts sheet\", s: \"In progress\", c: \"#b45309\", bg: \"#fffbeb\", who: \"JL\" },\n  { id: \"ATL-471\", t: \"Migrate color tokens to v3\", s: \"Done\", c: \"#047857\", bg: \"#ecfdf5\", who: \"SP\" },\n  { id: \"ATL-466\", t: \"Onboarding checklist copy\", s: \"Backlog\", c: \"#525252\", bg: \"#f4f4f5\", who: \"AR\" },\n];\n\nconst noop = () => () => {};\n\nfunction initials(name: string) {\n  return name\n    .split(/\\s+/)\n    .filter(Boolean)\n    .slice(0, 2)\n    .map((p) => p[0]!.toUpperCase())\n    .join(\"\");\n}\n\nexport function NavAppHeader({\n  breadcrumbs = defaultCrumbs,\n  status = \"Production\",\n  tabs = defaultTabs,\n  activeTab,\n  defaultActiveTab = 1,\n  onTabChange,\n  searchPlaceholder = \"Search issues, docs, people\",\n  onSearch,\n  notifications = 4,\n  onNotificationsClick,\n  user = { name: \"Sofia Petrov\", email: \"sofia@northwind.dev\" },\n  menu = defaultMenu,\n  defaultMenuOpen = false,\n  onMenuItemSelect,\n  accent = \"#2f7bff\",\n  showBackdrop = true,\n  className = \"\",\n  style,\n  ...rest\n}: NavAppHeaderProps) {\n  const uid = React.useId();\n  const [innerTab, setInnerTab] = React.useState(defaultActiveTab);\n  const current = activeTab ?? innerTab;\n  const [menuOpen, setMenuOpen] = React.useState(defaultMenuOpen);\n  const tabsRef = React.useRef<HTMLUListElement>(null);\n  const lineRef = React.useRef<HTMLLIElement>(null);\n  const hovRef = React.useRef<HTMLLIElement>(null);\n  const meRef = React.useRef<HTMLDivElement>(null);\n  const avRef = React.useRef<HTMLButtonElement>(null);\n  const menuRef = React.useRef<HTMLDivElement>(null);\n  const isMac = React.useSyncExternalStore(\n    noop,\n    () => typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent),\n    () => true,\n  );\n\n  const placeLine = React.useCallback(() => {\n    const list = tabsRef.current;\n    const line = lineRef.current;\n    if (!list || !line) return;\n    const el = list.querySelector<HTMLElement>(`[data-hb-yh5-i=\"${current}\"]`);\n    if (!el) return;\n    line.style.setProperty(\"--hb-yh5-lx\", `${(el.offsetLeft + 8).toFixed(1)}px`);\n    line.style.setProperty(\"--hb-yh5-lw\", `${Math.max(0, el.offsetWidth - 16).toFixed(1)}px`);\n  }, [current]);\n\n  React.useLayoutEffect(() => {\n    placeLine();\n    const list = tabsRef.current;\n    if (!list || typeof ResizeObserver === \"undefined\") return;\n    const ro = new ResizeObserver(() => placeLine());\n    ro.observe(list);\n    return () => ro.disconnect();\n  }, [placeLine]);\n\n  React.useEffect(() => {\n    if (!onSearch) return;\n    const onKey = (e: KeyboardEvent) => {\n      if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === \"k\") {\n        e.preventDefault();\n        onSearch();\n      }\n    };\n    window.addEventListener(\"keydown\", onKey);\n    return () => window.removeEventListener(\"keydown\", onKey);\n  }, [onSearch]);\n\n  React.useEffect(() => {\n    if (!menuOpen) return;\n    const onDown = (e: PointerEvent) => {\n      if (meRef.current && !meRef.current.contains(e.target as Node)) setMenuOpen(false);\n    };\n    document.addEventListener(\"pointerdown\", onDown);\n    return () => document.removeEventListener(\"pointerdown\", onDown);\n  }, [menuOpen]);\n\n  function hover(el: HTMLElement | null) {\n    const h = hovRef.current;\n    if (!h) return;\n    if (!el) {\n      h.style.opacity = \"0\";\n      return;\n    }\n    h.style.setProperty(\"--hb-yh5-hx\", `${el.offsetLeft.toFixed(1)}px`);\n    h.style.setProperty(\"--hb-yh5-hw\", `${el.offsetWidth.toFixed(1)}px`);\n    h.style.opacity = \"1\";\n  }\n\n  function pick(i: number) {\n    if (activeTab === undefined) setInnerTab(i);\n    onTabChange?.(i, tabs[i]!);\n  }\n\n  function items() {\n    return menuRef.current ? Array.from(menuRef.current.querySelectorAll<HTMLElement>('[role=\"menuitem\"]')) : [];\n  }\n\n  function openMenu(focus: \"first\" | \"last\" | null) {\n    setMenuOpen(true);\n    if (focus) {\n      window.requestAnimationFrame(() => {\n        const list = items();\n        (focus === \"first\" ? list[0] : list[list.length - 1])?.focus();\n      });\n    }\n  }\n\n  function closeMenu(refocus: boolean) {\n    setMenuOpen(false);\n    if (refocus) avRef.current?.focus();\n  }\n\n  function onMenuKey(e: React.KeyboardEvent) {\n    const list = items();\n    const at = list.indexOf(document.activeElement as HTMLElement);\n    if (e.key === \"ArrowDown\") {\n      e.preventDefault();\n      list[(at + 1) % list.length]?.focus();\n    } else if (e.key === \"ArrowUp\") {\n      e.preventDefault();\n      list[(at - 1 + list.length) % list.length]?.focus();\n    } else if (e.key === \"Home\") {\n      e.preventDefault();\n      list[0]?.focus();\n    } else if (e.key === \"End\") {\n      e.preventDefault();\n      list[list.length - 1]?.focus();\n    } else if (e.key === \"Escape\") {\n      e.preventDefault();\n      closeMenu(true);\n    } else if (e.key === \"Tab\") {\n      closeMenu(false);\n    }\n  }\n\n  function onTabsKey(e: React.KeyboardEvent) {\n    const nodes = tabsRef.current ? Array.from(tabsRef.current.querySelectorAll<HTMLElement>(\"a\")) : [];\n    const at = nodes.indexOf(document.activeElement as HTMLElement);\n    if (at < 0) return;\n    let next = -1;\n    if (e.key === \"ArrowRight\") next = (at + 1) % nodes.length;\n    else if (e.key === \"ArrowLeft\") next = (at - 1 + nodes.length) % nodes.length;\n    else if (e.key === \"Home\") next = 0;\n    else if (e.key === \"End\") next = nodes.length - 1;\n    if (next < 0) return;\n    e.preventDefault();\n    nodes[next]?.focus();\n  }\n\n  return (\n    <nav\n      aria-label=\"Project\"\n      className={`hb-yh5 ${className}`}\n      data-backdrop={showBackdrop ? \"true\" : \"false\"}\n      style={{ \"--hb-yh5-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-nav-app-header\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yh5-bar\">\n        <div className=\"hb-yh5-top\">\n          <a href=\"#\" className=\"hb-yh5-logo\" aria-label=\"Home\">\n            <svg viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n              <path d=\"M3 12.5 8 3l5 9.5M5.2 8.5h5.6\" />\n            </svg>\n          </a>\n          <ol className=\"hb-yh5-crumbs\" aria-label=\"Breadcrumb\">\n            {breadcrumbs.map((c, i) => {\n              const last = i === breadcrumbs.length - 1;\n              return (\n                <li\n                  key={c.label}\n                  className=\"hb-yh5-cr\"\n                  data-mid={!last && i > 0 ? \"true\" : \"false\"}\n                  style={{ \"--hb-yh5-i\": i } as React.CSSProperties}\n                >\n                  <svg className=\"hb-yh5-sl\" viewBox=\"0 0 18 22\" aria-hidden=\"true\">\n                    <path d=\"M11.5 4 6.5 18\" />\n                  </svg>\n                  <a href={c.href} className=\"hb-yh5-cl\" aria-current={last ? \"page\" : undefined}>\n                    {i === 0 && <span className=\"hb-yh5-ws\" aria-hidden=\"true\">{c.label[0]}</span>}\n                    <span>{c.label}</span>\n                    {(i === 0 || last) && (\n                      <svg className=\"hb-yh5-ud\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n                        <path d=\"m3.5 4.5 2.5-2.5 2.5 2.5M3.5 7.5 6 10l2.5-2.5\" />\n                      </svg>\n                    )}\n                  </a>\n                  {last && status && (\n                    <span className=\"hb-yh5-status\">\n                      <i aria-hidden=\"true\" />\n                      {status}\n                    </span>\n                  )}\n                </li>\n              );\n            })}\n          </ol>\n          <span className=\"hb-yh5-sp\" />\n          <button type=\"button\" className=\"hb-yh5-search\" onClick={() => onSearch?.()} aria-keyshortcuts={isMac ? \"Meta+K\" : \"Control+K\"} aria-label={searchPlaceholder}>\n            <svg viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n              <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n              <path d=\"m10.5 10.5 3 3\" />\n            </svg>\n            <span className=\"hb-yh5-st\" aria-hidden=\"true\">\n              {searchPlaceholder}\n            </span>\n            <span className=\"hb-yh5-kbd\" aria-hidden=\"true\">\n              {isMac ? \"⌘K\" : \"Ctrl K\"}\n            </span>\n          </button>\n          <button\n            type=\"button\"\n            className=\"hb-yh5-icon\"\n            onClick={() => onNotificationsClick?.()}\n            aria-label={notifications > 0 ? `Notifications, ${notifications} unread` : \"Notifications\"}\n          >\n            <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n              <path d=\"M5 8.5a5 5 0 0 1 10 0c0 4 1.5 5.5 1.5 5.5h-13S5 12.5 5 8.5zM8.3 16.5a1.9 1.9 0 0 0 3.4 0\" />\n            </svg>\n            {notifications > 0 && <b aria-hidden=\"true\">{notifications > 9 ? \"9+\" : notifications}</b>}\n          </button>\n          {user && (\n            <div ref={meRef} className=\"hb-yh5-me\">\n              <button\n                ref={avRef}\n                type=\"button\"\n                className=\"hb-yh5-av\"\n                aria-haspopup=\"menu\"\n                aria-expanded={menuOpen}\n                aria-controls={`${uid}-menu`}\n                aria-label={`Account menu for ${user.name}`}\n                onClick={() => (menuOpen ? closeMenu(false) : openMenu(null))}\n                onKeyDown={(e) => {\n                  if (e.key === \"ArrowDown\" || e.key === \"Enter\" || e.key === \" \") {\n                    e.preventDefault();\n                    openMenu(\"first\");\n                  } else if (e.key === \"ArrowUp\") {\n                    e.preventDefault();\n                    openMenu(\"last\");\n                  } else if (e.key === \"Escape\") closeMenu(true);\n                }}\n              >\n                {initials(user.name)}\n              </button>\n              {menuOpen && (\n                <div ref={menuRef} id={`${uid}-menu`} role=\"menu\" aria-label=\"Account\" className=\"hb-yh5-menu\" onKeyDown={onMenuKey}>\n                  <div className=\"hb-yh5-mh\" role=\"presentation\">\n                    <div className=\"hb-yh5-mn\">{user.name}</div>\n                    <div className=\"hb-yh5-me2\">{user.email}</div>\n                  </div>\n                  {menu.map((item, i) => {\n                    const divider = item.danger && i > 0 && !menu[i - 1]!.danger;\n                    const select = () => {\n                      onMenuItemSelect?.(item);\n                      closeMenu(true);\n                    };\n                    const body = (\n                      <>\n                        {item.label}\n                        {item.shortcut && <span className=\"hb-yh5-ms\">{item.shortcut}</span>}\n                      </>\n                    );\n                    return (\n                      <React.Fragment key={item.label}>\n                        {divider && <div className=\"hb-yh5-div\" role=\"separator\" />}\n                        {item.href ? (\n                          <a href={item.href} role=\"menuitem\" tabIndex={-1} className=\"hb-yh5-mi\" data-danger={item.danger ? \"true\" : \"false\"} onClick={select}>\n                            {body}\n                          </a>\n                        ) : (\n                          <button type=\"button\" role=\"menuitem\" tabIndex={-1} className=\"hb-yh5-mi\" data-danger={item.danger ? \"true\" : \"false\"} onClick={select}>\n                            {body}\n                          </button>\n                        )}\n                      </React.Fragment>\n                    );\n                  })}\n                </div>\n              )}\n            </div>\n          )}\n        </div>\n        <ul ref={tabsRef} className=\"hb-yh5-tabs\" onKeyDown={onTabsKey} onPointerLeave={() => hover(null)}>\n          <li ref={hovRef} className=\"hb-yh5-hov\" aria-hidden=\"true\" />\n          <li ref={lineRef} className=\"hb-yh5-line\" aria-hidden=\"true\" />\n          {tabs.map((t, i) => (\n            <li key={t.label}>\n              <a\n                href={t.href}\n                className=\"hb-yh5-tab\"\n                data-hb-yh5-i={i}\n                aria-current={i === current ? \"page\" : undefined}\n                onPointerEnter={(e) => hover(e.currentTarget)}\n                onFocus={(e) => hover(e.currentTarget)}\n                onBlur={() => hover(null)}\n                onClick={() => pick(i)}\n              >\n                {t.label}\n                {t.count !== undefined && <span className=\"hb-yh5-ct\">{t.count}</span>}\n              </a>\n            </li>\n          ))}\n        </ul>\n      </div>\n      {showBackdrop && (\n        <div className=\"hb-yh5-page\" aria-hidden=\"true\">\n          <div className=\"hb-yh5-ph\">\n            <div>\n              <div className=\"hb-yh5-pt\">{tabs[current]?.label ?? \"Overview\"}</div>\n              <div className=\"hb-yh5-pd\">Sprint 34, ends Friday, November 14</div>\n            </div>\n            <div className=\"hb-yh5-pb\">New issue</div>\n          </div>\n          <div className=\"hb-yh5-cards\">\n            {[\n              [\"Open\", \"24\", \"-3\"],\n              [\"In review\", \"7\", \"+2\"],\n              [\"Closed this week\", \"31\", \"+18%\"],\n              [\"Cycle time\", \"2.4d\", \"-0.6d\"],\n            ].map(([k, v, d]) => (\n              <div key={k} className=\"hb-yh5-card\">\n                <div className=\"hb-yh5-ck\">{k}</div>\n                <div className=\"hb-yh5-cv\">\n                  {v}\n                  <em>{d}</em>\n                </div>\n              </div>\n            ))}\n          </div>\n          <div className=\"hb-yh5-table\">\n            <div className=\"hb-yh5-tr\">\n              <span>ID</span>\n              <span>Title</span>\n              <span>Status</span>\n              <span>Owner</span>\n            </div>\n            {rows.map((r) => (\n              <div key={r.id} className=\"hb-yh5-tr\">\n                <span className=\"hb-yh5-id\">{r.id}</span>\n                <span>{r.t}</span>\n                <span className=\"hb-yh5-tag\" style={{ color: r.c, background: r.bg }}>\n                  {r.s}\n                </span>\n                <span>{r.who}</span>\n              </div>\n            ))}\n          </div>\n        </div>\n      )}\n    </nav>\n  );\n}\n"
    }
  ]
}