{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-sidebar-flat",
  "type": "registry:block",
  "title": "App sidebar, flat",
  "description": "",
  "categories": [
    "app"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-sidebar.json",
    "https://ui.klarhimmel.com/r/sidebar.json",
    "https://ui.klarhimmel.com/r/tooltip.json"
  ],
  "files": [
    {
      "path": "src/blocks/app-sidebar-flat/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/app-sidebar-flat/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t } from '../_shared/schema';\nimport { sidebarItem } from '../_shared/sidebar-schema';\n\nconst schema = z.object({\n  brand: t(30),\n  /** Names the navigation landmark. Not shown. */\n  navLabel: t(40),\n  items: z.array(sidebarItem).min(1).max(12),\n  /** The label of the page the person is on (matches one item). */\n  active: t(30),\n  /** The signed-in person's name at the foot. Empty: no footer. */\n  account: t(40),\n});\n\nexport const spec = defineSpec({\n  type: 'app-sidebar-flat',\n  aliases: ['app/sidebar-flat'],\n  name: 'App sidebar, flat',\n  category: 'app',\n  role: 'nav',\n  description: \"An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot. On a phone it folds into a menu.\",\n  schema,\n  defaults: {\n    brand: 'Name the product',\n    navLabel: 'Main navigation',\n    items: [\n      { label: 'First page', icon: 'gauge', href: '#overview' },\n      { label: 'Second page', icon: 'book', href: '#bookings' },\n      { label: 'Page three', icon: 'users', href: '#team' },\n      { label: 'Fourth page', icon: 'settings', href: '#settings' },\n    ],\n    active: 'First page',\n    account: 'Name the signed-in person',\n  },\n});\n"
    },
    {
      "path": "src/blocks/app-sidebar-flat/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/app-sidebar-flat/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { TooltipProvider } from '../../ui/tooltip';\nimport { Sidebar, SidebarHeader, SidebarMenu, SidebarNav } from '../../ui/sidebar';\nimport { Account, Place } from '../_shared/sidebar-kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\nfunction AppSidebarFlat({ props }: BlockProps<Props>) {\n  const id = useId();\n  return (\n    <TooltipProvider>\n      <Sidebar foldLabel=\"Menu\" header={<SidebarHeader><Text path={['brand']} value={props.brand} as=\"span\" className=\"truncate font-semibold text-kh-ink\" /></SidebarHeader>}>\n        <span id={`${id}-n`} className=\"sr-only\">\n          <Text path={['navLabel']} value={props.navLabel} as=\"span\" />\n        </span>\n        <SidebarNav aria-labelledby={`${id}-n`}>\n          <SidebarMenu>{props.items.map((it, i) => <Place key={i} it={it} path={['items', i]} active={props.active} />)}</SidebarMenu>\n        </SidebarNav>\n        <Account name={props.account} />\n      </Sidebar>\n    </TooltipProvider>\n  );\n}\n\nexport default withHeadingLevel(AppSidebarFlat);\n"
    }
  ]
}
