{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "openlmis-no-access",
  "title": "No Access",
  "description": "No-access empty state with a heading-level choice and optional Back Home link.",
  "dependencies": [
    "lucide-react@^1",
    "@base-ui/react@^1"
  ],
  "registryDependencies": [
    "button",
    "empty"
  ],
  "files": [
    {
      "path": "registry/components/openlmis/no-access/no-access.tsx",
      "content": "import { HouseIcon, LockIcon } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Empty,\n  EmptyContent,\n  EmptyDescription,\n  EmptyHeader,\n  EmptyMedia,\n  EmptyTitle,\n} from \"@/components/ui/empty\"\n\ntype NoAccessProps = {\n  /** `h1` when it stands in for the whole page, `h2` inside one. */\n  heading?: \"h1\" | \"h2\"\n  /** Where Back Home goes; `null` leaves the button out. */\n  homeHref?: string | null\n}\n\n/** Where a page's content would be, for a user whose roles do not reach it. */\nexport function NoAccess({\n  heading: Heading = \"h2\",\n  homeHref = \"/\",\n}: NoAccessProps) {\n  return (\n    <Empty>\n      <EmptyHeader>\n        <EmptyMedia variant=\"icon\">\n          <LockIcon />\n        </EmptyMedia>\n        <EmptyTitle>\n          <Heading>No Access To This Page</Heading>\n        </EmptyTitle>\n        <EmptyDescription>\n          Your roles do not include the rights this page needs. Ask an\n          administrator if you need access.\n        </EmptyDescription>\n      </EmptyHeader>\n      {homeHref !== null && (\n        <EmptyContent>\n          <Button\n            nativeButton={false}\n            // oxlint-disable-next-line jsx-a11y/control-has-associated-label -- Base UI renders the Button's text into the link\n            render={<a href={homeHref} />}\n            variant=\"outline\"\n          >\n            <HouseIcon data-icon=\"inline-start\" />\n            Back Home\n          </Button>\n        </EmptyContent>\n      )}\n    </Empty>\n  )\n}",
      "type": "registry:component",
      "target": "components/openlmis/no-access.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": "477px"
  },
  "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": [
    "feedback"
  ],
  "type": "registry:component"
}
