{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shell-chrome",
  "title": "Signed-in shell",
  "description": "The signed-in chrome: a header with the brand and account, a sidebar for navigation, and the page, with an offline notice when the connection drops.",
  "dependencies": [
    "@registrystack/app-runtime@~0.43.0-next.0"
  ],
  "registryDependencies": [
    "@registrystack/lib-notice",
    "@registrystack/shell-branding",
    "@registrystack/shell-content",
    "@registrystack/shell-language-switch",
    "@registrystack/shell-sign-out"
  ],
  "files": [
    {
      "path": "shell/chrome.tsx",
      "content": "import { useEffect, useState, type ReactNode } from \"react\";\nimport type { AuthenticatedSession } from \"@registrystack/app-runtime\";\nimport { Notice } from \"@/blocks/lib/notice\";\nimport { useBranding } from \"@/blocks/shell/branding\";\nimport { LanguageSwitch } from \"@/blocks/shell/language-switch\";\nimport { SignOut, SwitchAccount } from \"@/blocks/shell/sign-out\";\nimport { useShellContent } from \"@/blocks/shell/shell-content\";\n\n/**\n * The signed-in chrome: a sidebar with the brand and the navigation, a header\n * with the account and the language switch, and the page. The caller supplies\n * the navigation itself, so this shell carries no opinion on what places exist.\n */\nexport function Shell({\n  audience,\n  session,\n  navigation,\n  children,\n}: {\n  audience: \"staff\" | \"service\";\n  session: AuthenticatedSession;\n  navigation: ReactNode;\n  children: ReactNode;\n}) {\n  const c = useShellContent();\n  const branding = useBranding();\n  const workspace = audience === \"staff\" ? c.staffName : c.serviceName;\n  const [online, setOnline] = useState(navigator.onLine);\n  useEffect(() => {\n    const update = () => setOnline(navigator.onLine);\n    window.addEventListener(\"online\", update);\n    window.addEventListener(\"offline\", update);\n    return () => {\n      window.removeEventListener(\"online\", update);\n      window.removeEventListener(\"offline\", update);\n    };\n  }, []);\n  return (\n    <div className={`shell shell-${audience}`}>\n      <a\n        className=\"skip-link\"\n        href=\"#main\"\n        onClick={(e) => {\n          e.preventDefault();\n          document.getElementById(\"main\")?.focus();\n        }}\n      >\n        {c.skip}\n      </a>\n      <aside className=\"sidebar\" aria-label={workspace}>\n        <a href=\"#/\" className=\"brand\">\n          <svg\n            className=\"brand-mark\"\n            viewBox=\"0 0 28 28\"\n            width=\"28\"\n            height=\"28\"\n            aria-hidden=\"true\"\n          >\n            <path d=\"M6 20 9 8h3.5L9.5 20zM12 20l3-12h3.5L15.5 20zM18 20l3-12h3.5L21.5 20z\" />\n          </svg>\n          <span className=\"brand-name\">{c.brand}</span>\n          <span className=\"beta\">{c.beta}</span>\n        </a>\n        <p className=\"workspace\">{workspace}</p>\n        {branding.description && (\n          <p className=\"workspace-description mb-4 text-sm leading-snug text-[var(--sidebar-muted)]\">\n            {branding.description}\n          </p>\n        )}\n        {navigation}\n      </aside>\n      <div className=\"shell-column\">\n        <header className=\"topbar\">\n          <p className=\"crumb\">{workspace}</p>\n          <div className=\"account\">\n            {session.displayName && (\n              <div>\n                <span>{c.signedInAs}</span>\n                <strong>{session.displayName}</strong>\n              </div>\n            )}\n            <LanguageSwitch />\n            <SwitchAccount app={session.app ?? audience} />\n            <SignOut />\n          </div>\n        </header>\n        <main id=\"main\" tabIndex={-1}>\n          {!online && <Notice tone=\"warning\">{c.offline}</Notice>}\n          {children}\n          <footer>\n            <span>{c.footer}</span>\n            <span>{c.footerNote}</span>\n          </footer>\n        </main>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:block",
      "target": "@components/shell/chrome.tsx"
    }
  ],
  "type": "registry:block"
}