{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "openlmis-page-breadcrumbs",
  "title": "Page Breadcrumbs",
  "description": "Breadcrumb trail from a list of steps, where a step without a page, such as a menu section, shows as text, and links render through any router.",
  "dependencies": [
    "@base-ui/react@^1"
  ],
  "registryDependencies": [
    "breadcrumb"
  ],
  "files": [
    {
      "path": "registry/components/openlmis/page-breadcrumbs/page-breadcrumbs.tsx",
      "content": "import { Fragment, type ReactElement } from \"react\"\n\nimport {\n  Breadcrumb,\n  BreadcrumbItem,\n  BreadcrumbLink,\n  BreadcrumbList,\n  BreadcrumbPage,\n  BreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\"\n\nexport type BreadcrumbTrailItem = {\n  label: string\n  /** Leave out for a step with no page of its own, such as a menu section. */\n  href?: string\n}\n\ntype PageBreadcrumbsProps = {\n  /** Outermost first; the last item is the current page. */\n  items: BreadcrumbTrailItem[]\n  /** Renders a link for a step, e.g. a router's Link; a plain anchor by default. */\n  renderLink?: (item: BreadcrumbTrailItem & { href: string }) => ReactElement\n  label?: string\n}\n\nexport function PageBreadcrumbs({\n  items,\n  renderLink,\n  label = \"Breadcrumb\",\n}: PageBreadcrumbsProps) {\n  if (items.length === 0) return null\n\n  return (\n    <Breadcrumb aria-label={label}>\n      <BreadcrumbList>\n        {items.map((item, index) => {\n          const isCurrent = index === items.length - 1\n          const href = item.href\n\n          return (\n            <Fragment key={item.label}>\n              {index > 0 && <BreadcrumbSeparator />}\n              <BreadcrumbItem>\n                {isCurrent ? (\n                  <BreadcrumbPage>{item.label}</BreadcrumbPage>\n                ) : href ? (\n                  <BreadcrumbLink\n                    href={href}\n                    render={renderLink?.({ ...item, href })}\n                  >\n                    {item.label}\n                  </BreadcrumbLink>\n                ) : (\n                  <span>{item.label}</span>\n                )}\n              </BreadcrumbItem>\n            </Fragment>\n          )\n        })}\n      </BreadcrumbList>\n    </Breadcrumb>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/page-breadcrumbs.tsx"
    }
  ],
  "cssVars": {
    "light": {
      "destructive": "oklch(0.577 0.245 27.325)",
      "destructive-foreground": "oklch(0.985 0 0)",
      "success": "oklch(0.596 0.145 163.225)",
      "success-foreground": "oklch(0.985 0 0)",
      "warning": "oklch(0.666 0.179 58.318)",
      "warning-foreground": "oklch(0.985 0 0)",
      "info": "oklch(0.55 0.13 237)",
      "info-foreground": "oklch(0.985 0 0)"
    },
    "dark": {
      "destructive": "oklch(0.704 0.191 22.216)",
      "destructive-foreground": "oklch(0.21 0.04 25)",
      "success": "oklch(0.696 0.17 162.48)",
      "success-foreground": "oklch(0.21 0.04 163)",
      "warning": "oklch(0.769 0.188 70.08)",
      "warning-foreground": "oklch(0.22 0.04 60)",
      "info": "oklch(0.7 0.14 237)",
      "info-foreground": "oklch(0.2 0.04 240)"
    }
  },
  "meta": {
    "project": "openlmis",
    "height": "84px"
  },
  "docs": "Requires a `base-*` style in components.json (the `shadcn init` default). Legacy `new-york`/`radix-*` styles install Radix primitives, which reject the `render` prop this item uses.",
  "categories": [
    "navigation"
  ],
  "type": "registry:component"
}
