{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The top bar of DashboardShell: the brand (when no sidebar carries it), the links (when there is no sidebar), an optional search field, and the signed-in person.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * The top bar of DashboardShell: the brand (when no sidebar carries it), the links (when there is no sidebar),\n * an optional search field, and the signed-in person.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Block, Box, Group, Inline, List, ListItem, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { MenuEntry } from \"../components/menu-entry\";\nimport { NavBlock } from \"../components/nav-block\";\nimport { SearchPalette } from \"../components/search-palette\";\nimport { cn, tpl, uniqLabel } from \"../utils\";\nimport type { ShellNav } from \"../blocks/dashboard-shell.types\";\n\nexport type ShellTopbarProps = {\n  nav: ShellNav;\n  brand?: \"show\" | \"hide\";\n  links?: \"show\" | \"hide\";\n  search?: \"show\" | \"hide\";\n  landmarkLabel?: string;\n};\n\nexport function ShellTopbar({\n  nav,\n  brand = \"show\",\n  links = \"hide\",\n  search = \"show\",\n  landmarkLabel,\n}: ShellTopbarProps) {\n  return (\n    <Block\n      tag=\"header\"\n      class=\"flex h-16 shrink-0 items-center gap-6 border-b border-border bg-background px-6\"\n      aria-label={landmarkLabel}\n      data-slot=\"topbar\"\n    >\n      {((brand as string) === \"show\") ? (\n        <Group gap=\"2\" align=\"center\" class=\"shrink-0\" data-slot=\"brand\">\n          <LucideIcon name=\"layers\" size={24} />\n          <Text size=\"base\" weight=\"bold\" class={(true ? \"\" : \"sr-only\")}>\n            {nav.brand}\n          </Text>\n        </Group>\n      ) : null}\n      {(((links as string) === \"show\") && ((nav.links?.length ?? 0) > 0)) ? (\n        <NavBlock\n          label={(landmarkLabel ? uniqLabel(tpl(\"{0}, {1}\", nav.label, landmarkLabel)) : nav.label)}\n          class=\"hidden lg:block\"\n        >\n          <List class=\"m-0 flex list-none items-center gap-2 p-0\">\n            <For each={nav.links ?? []}>{(l) => (\n              <ListItem data-slot=\"links-row\">\n                <MenuEntry\n                  href={l.href}\n                  class={cn(\n                    \"flex items-center gap-4 rounded py-2 text-sm\",\n                    (true ? \"px-4\" : \"justify-center px-2\"),\n                    ((l.id === nav.current) ? \"bg-muted font-medium\" : \"\")\n                  )}\n                  current={(l.id === nav.current)}\n                  size=\"sm\"\n                  testid=\"item\"\n                >\n                  <LucideIcon name={l.icon} size={16} />\n                  <Inline class={(true ? \"\" : \"sr-only\")}>\n                    {l.name}\n                  </Inline>\n                </MenuEntry>\n              </ListItem>\n            )}</For>\n          </List>\n        </NavBlock>\n      ) : null}\n      {((search as string) === \"show\") ? (\n        <>\n          {((links as string) === \"show\") ? (\n            <Box class=\"ml-auto hidden w-64 shrink-0 xl:block\">\n              <SearchPalette label={nav.search} shortcut={nav.shortcut} />\n            </Box>\n          ) : (\n            <SearchPalette label={nav.search} shortcut={nav.shortcut} />\n          )}\n        </>\n      ) : null}\n      <Group\n        gap=\"4\"\n        align=\"center\"\n        class={\n          ((links as string) === \"show\") && ((search as string) === \"show\") ? \"shrink-0\"\n          : \"ml-auto shrink-0\"\n        }\n        data-slot=\"user\"\n      >\n        <LucideIcon name=\"bell\" size={20} class=\"text-muted-foreground\" />\n        <MediaFrame alt={nav.userName} ratio=\"1/1\" class=\"size-8 shrink-0 rounded-full\" />\n      </Group>\n    </Block>\n  );\n}\n",
      "path": "components/shell-topbar.tsx",
      "target": "components/shell-topbar.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "shell-topbar",
  "registryDependencies": [
    "compose",
    "dashboard-shell",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "nav-block",
    "search-palette",
    "utils"
  ],
  "runtime": "solid",
  "title": "Shell Topbar",
  "type": "registry:component"
}
