{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navigation-17",
  "type": "registry:block",
  "description": "App top bar with a workspace switcher, project search and notifications popover panels.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/navigation/navigation-17.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Bell,\n  Check,\n  ChevronsUpDown,\n  CreditCard,\n  LogOut,\n  Plus,\n  Search,\n  Settings,\n  User,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nimport { Logo } from \"@/src/components/logo\"\n\nconst workspaces = [\n  { name: \"Designali Studio\", plan: \"Team\", initials: \"DS\" },\n  { name: \"Side project\", plan: \"Free\", initials: \"SP\" },\n  { name: \"Dalim Agency\", plan: \"Pro\", initials: \"DA\" },\n]\n\nconst notifications = [\n  { who: \"Sara\", what: \"commented on Dalim UI landing page\", when: \"2m\" },\n  { who: \"Build bot\", what: \"deployed designali.com@4f2a1c to production\", when: \"18m\" },\n  { who: \"Omar\", what: \"invited you to Portfolio template\", when: \"1h\" },\n]\n\ntype Panel = \"workspace\" | \"notifications\" | \"account\" | null\n\nexport default function Navigation17() {\n  const [panel, setPanel] = useState<Panel>(null)\n  const [workspace, setWorkspace] = useState(workspaces[0]!)\n\n  function toggle(next: Panel) {\n    setPanel((current) => (current === next ? null : next))\n  }\n\n  return (\n    <section className=\"w-full bg-muted/40 pb-72\">\n      <header className=\"relative border-b bg-background\">\n        <div className=\"mx-auto flex h-14 max-w-7xl items-center gap-3 px-4 sm:px-6\">\n          <Logo className=\"h-5 w-auto shrink-0\" />\n          <span className=\"text-muted-foreground/50\">/</span>\n\n          <div className=\"relative min-w-0\">\n            <button\n              type=\"button\"\n              onClick={() => toggle(\"workspace\")}\n              aria-expanded={panel === \"workspace\"}\n              className=\"flex h-9 min-w-0 items-center gap-2 px-2 text-sm hover:bg-muted\"\n            >\n              <span className=\"flex size-6 shrink-0 items-center justify-center bg-muted text-[10px] font-semibold\">\n                {workspace.initials}\n              </span>\n              <span className=\"truncate font-medium\">{workspace.name}</span>\n              <span className=\"hidden border px-1.5 text-[10px] text-muted-foreground sm:inline\">\n                {workspace.plan}\n              </span>\n              <ChevronsUpDown className=\"size-3.5 shrink-0 text-muted-foreground\" />\n            </button>\n            {panel === \"workspace\" && (\n              <div className=\"absolute start-0 top-full z-20 mt-1 w-64 border bg-popover p-1 text-sm text-popover-foreground\">\n                <p className=\"px-2 py-1.5 text-xs text-muted-foreground\">Workspaces</p>\n                {workspaces.map((item) => (\n                  <button\n                    key={item.name}\n                    type=\"button\"\n                    onClick={() => {\n                      setWorkspace(item)\n                      setPanel(null)\n                    }}\n                    className=\"flex w-full items-center gap-2 px-2 py-2 hover:bg-muted\"\n                  >\n                    <span className=\"flex size-6 items-center justify-center bg-muted text-[10px] font-semibold\">\n                      {item.initials}\n                    </span>\n                    <span className=\"flex-1 text-start\">{item.name}</span>\n                    {item.name === workspace.name && <Check className=\"size-4\" />}\n                  </button>\n                ))}\n                <div className=\"my-1 h-px bg-border\" />\n                <button type=\"button\" className=\"flex w-full items-center gap-2 px-2 py-2 text-muted-foreground hover:bg-muted hover:text-foreground\">\n                  <Plus className=\"size-4\" />\n                  New workspace\n                </button>\n              </div>\n            )}\n          </div>\n\n          <button\n            type=\"button\"\n            className=\"ms-auto hidden h-9 w-64 items-center gap-2 border px-3 text-sm text-muted-foreground hover:bg-muted md:flex\"\n          >\n            <Search className=\"size-4\" />\n            Search projects\n            <kbd className=\"ms-auto border bg-muted px-1.5 font-mono text-[10px]\">/</kbd>\n          </button>\n\n          <div className=\"relative ms-auto md:ms-0\">\n            <button\n              type=\"button\"\n              aria-label=\"Notifications\"\n              onClick={() => toggle(\"notifications\")}\n              className=\"relative flex size-9 items-center justify-center hover:bg-muted\"\n            >\n              <Bell className=\"size-4\" />\n              <span className=\"absolute top-2 right-2 size-2 rounded-full bg-destructive ring-2 ring-background\" />\n            </button>\n            {panel === \"notifications\" && (\n              <div className=\"absolute end-0 top-full z-20 mt-1 w-[min(20rem,calc(100vw-2rem))] border bg-popover text-sm text-popover-foreground\">\n                <div className=\"flex items-center justify-between border-b px-4 py-3\">\n                  <span className=\"font-medium\">Notifications</span>\n                  <button type=\"button\" className=\"text-xs text-muted-foreground hover:text-foreground\">\n                    Mark all read\n                  </button>\n                </div>\n                <ul className=\"divide-y\">\n                  {notifications.map((item) => (\n                    <li key={item.what} className=\"flex gap-3 px-4 py-3\">\n                      <span className=\"flex size-8 shrink-0 items-center justify-center bg-muted text-xs font-medium\">\n                        {item.who.slice(0, 1)}\n                      </span>\n                      <p className=\"flex-1 text-muted-foreground\">\n                        <span className=\"font-medium text-foreground\">{item.who}</span> {item.what}\n                      </p>\n                      <span className=\"text-xs text-muted-foreground\">{item.when}</span>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            )}\n          </div>\n\n          <div className=\"relative\">\n            <button\n              type=\"button\"\n              aria-label=\"Account menu\"\n              onClick={() => toggle(\"account\")}\n              className={cn(\n                \"flex size-9 items-center justify-center bg-gradient-to-br from-primary to-primary text-xs font-semibold text-white\",\n                panel === \"account\" && \"ring-2 ring-foreground ring-offset-2 ring-offset-background\"\n              )}\n            >\n              AI\n            </button>\n            {panel === \"account\" && (\n              <div className=\"absolute end-0 top-full z-20 mt-1 w-56 border bg-popover p-1 text-sm text-popover-foreground\">\n                <div className=\"px-2 py-2\">\n                  <p className=\"font-medium\">Ali Imam</p>\n                  <p className=\"text-xs text-muted-foreground\">ali@designali.com</p>\n                </div>\n                <div className=\"my-1 h-px bg-border\" />\n                {[\n                  { icon: User, label: \"Profile\" },\n                  { icon: CreditCard, label: \"Billing\" },\n                  { icon: Settings, label: \"Settings\" },\n                  { icon: LogOut, label: \"Sign out\" },\n                ].map((item) => (\n                  <button key={item.label} type=\"button\" className=\"flex w-full items-center gap-2 px-2 py-2 hover:bg-muted\">\n                    <item.icon className=\"size-4 text-muted-foreground\" />\n                    {item.label}\n                  </button>\n                ))}\n              </div>\n            )}\n          </div>\n        </div>\n      </header>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "600px"
  },
  "categories": [
    "navigation"
  ]
}