{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-pages-01",
  "description": "A not found page that shows the missing path, a search and the places people usually look.",
  "registryDependencies": [
    "button",
    "input",
    "https://www.dashboardblocks.com/r/radix/error-pages.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/error-pages/error-pages-01.tsx",
      "content": "'use client'\n\nimport { ErrorPageLayout } from '@/registry/components/dashboardblocks/error-pages'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\nimport { type FormEvent, type ReactNode, useId, useState } from 'react'\n\nimport { Button, buttonVariants } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\n\ninterface ErrorPageLink {\n  description: string\n  href: string\n  icon: ReactNode\n  title: string\n}\n\ninterface ErrorPages1Props {\n  brand?: ReactNode\n  homeHref: string\n  links: ErrorPageLink[]\n  onSearch?: (query: string) => void\n  path?: string\n}\n\nconst exampleProps: ErrorPages1Props = {\n  brand: (\n    <>\n      <span className='bg-primary text-primary-foreground flex size-7 items-center justify-center rounded-md [&_svg]:size-4'>\n        <IconPlaceholder\n          lucide='BlocksIcon'\n          tabler='IconCube'\n          hugeicons='CubeIcon'\n          phosphor='CubeIcon'\n          remixicon='RiBox3Line'\n        />\n      </span>\n      Acme Analytics\n    </>\n  ),\n  homeHref: '#',\n  links: [\n    {\n      description: 'Every dashboard in the workspace',\n      href: '#',\n      icon: (\n        <IconPlaceholder\n          lucide='LayoutDashboardIcon'\n          tabler='IconLayoutDashboard'\n          hugeicons='DashboardSquare01Icon'\n          phosphor='SquaresFourIcon'\n          remixicon='RiDashboardLine'\n        />\n      ),\n      title: 'Dashboards',\n    },\n    {\n      description: 'Scheduled and saved reports',\n      href: '#',\n      icon: (\n        <IconPlaceholder\n          lucide='FileTextIcon'\n          tabler='IconFileText'\n          hugeicons='File01Icon'\n          phosphor='FileTextIcon'\n          remixicon='RiFileTextLine'\n        />\n      ),\n      title: 'Reports',\n    },\n    {\n      description: 'Guides and answers',\n      href: '#',\n      icon: (\n        <IconPlaceholder\n          lucide='LifeBuoyIcon'\n          tabler='IconLifebuoy'\n          hugeicons='HelpCircleIcon'\n          phosphor='LifebuoyIcon'\n          remixicon='RiLifebuoyLine'\n        />\n      ),\n      title: 'Help center',\n    },\n  ],\n  onSearch: () => {},\n  path: '/dashboards/revenue-overveiw',\n}\n\nconst ErrorPages1 = ({ brand, homeHref, links, onSearch, path }: ErrorPages1Props) => {\n  const id = useId()\n  const [query, setQuery] = useState('')\n\n  const search = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault()\n    if (query.trim()) onSearch?.(query.trim())\n  }\n\n  return (\n    <ErrorPageLayout\n      brand={brand}\n      code='404'\n      title='Page not found'\n      description={\n        path ? (\n          <>\n            Nothing lives at{' '}\n            <code className='text-foreground font-mono text-sm break-all'>{path}</code>.\n            It may have moved, or the link has a typo.\n          </>\n        ) : (\n          'The page may have moved, or the link has a typo.'\n        )\n      }\n    >\n      {onSearch && (\n        <form method='post' role='search' onSubmit={search} className='flex gap-2'>\n          <label htmlFor={`${id}-search`} className='sr-only'>\n            Search dashboards and reports\n          </label>\n          <Input\n            id={`${id}-search`}\n            type='search'\n            placeholder='Search'\n            value={query}\n            onChange={(event) => setQuery(event.target.value)}\n          />\n          <Button type='submit' variant='outline'>\n            Search\n          </Button>\n        </form>\n      )}\n      <ul className='flex flex-col divide-y border-y'>\n        {links.map((link) => (\n          <li key={link.title}>\n            <a\n              href={link.href}\n              className='hover:bg-muted focus-visible:ring-ring/50 -mx-2 flex items-center gap-3 rounded-md px-2 py-2.5 outline-none focus-visible:ring-3 focus-visible:ring-inset'\n            >\n              <span aria-hidden className='text-muted-foreground shrink-0 [&_svg]:size-4'>\n                {link.icon}\n              </span>\n              <span className='flex min-w-0 flex-1 flex-col'>\n                <span className='text-sm font-medium'>{link.title}</span>\n                <span className='text-muted-foreground truncate text-xs'>\n                  {link.description}\n                </span>\n              </span>\n              <IconPlaceholder\n                lucide='ChevronRightIcon'\n                tabler='IconChevronRight'\n                hugeicons='ArrowRight01Icon'\n                phosphor='CaretRightIcon'\n                remixicon='RiArrowRightSLine'\n                aria-hidden\n                className='text-muted-foreground size-4 shrink-0'\n              />\n            </a>\n          </li>\n        ))}\n      </ul>\n      <div className='flex flex-wrap gap-2'>\n        <a href={homeHref} className={buttonVariants()}>\n          Go to dashboards\n          <IconPlaceholder\n            lucide='ArrowRightIcon'\n            tabler='IconArrowRight'\n            hugeicons='ArrowRight01Icon'\n            phosphor='ArrowRightIcon'\n            remixicon='RiArrowRightLine'\n            data-icon='inline-end'\n          />\n        </a>\n        <Button variant='ghost' onClick={() => window.history.back()}>\n          <IconPlaceholder\n            lucide='ArrowLeftIcon'\n            tabler='IconArrowLeft'\n            hugeicons='ArrowLeft01Icon'\n            phosphor='ArrowLeftIcon'\n            remixicon='RiArrowLeftLine'\n            data-icon='inline-start'\n          />\n          Go back\n        </Button>\n      </div>\n    </ErrorPageLayout>\n  )\n}\n\nexport {\n  ErrorPages1,\n  exampleProps as errorPages1ExampleProps,\n  type ErrorPageLink,\n  type ErrorPages1Props,\n}\n",
      "type": "registry:component",
      "target": "@components/dashboardblocks/error-pages/error-pages-01.tsx"
    }
  ],
  "meta": {
    "shows": "A not found page that shows the missing path, a search and the places people usually look.",
    "size": "page",
    "usedWith": [
      "error-pages-02"
    ],
    "component": "ErrorPages1",
    "props": "{ brand?: ReactNode; homeHref: string; links: { description: string; href: string; icon: ReactNode; title: string }[]; onSearch?: (query: string) => void; path?: string }"
  },
  "type": "registry:component"
}
