{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "type": "registry:block",
  "title": "Empty state",
  "description": "What a page or list shows before it has content: an icon in a tinted circle, a title, one sentence of why it's empty and a clear next step.",
  "dependencies": [],
  "registryDependencies": [
    "https://unbuiltui.com/r/button.json",
    "https://unbuiltui.com/r/utils.json"
  ],
  "files": [
    {
      "path": "components/blocks/empty-state.tsx",
      "type": "registry:component",
      "target": "components/blocks/empty-state.tsx",
      "content": "import type * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\n// UnbuiltUI block: what a list or page shows before it has content. An icon in a\n// tinted circle, one sentence of why it's empty and one clear next step.\n\ntype EmptyStateProps = {\n  /** A lucide icon element, e.g. <InboxIcon />. */\n  icon?: React.ReactNode;\n  title: string;\n  description?: string;\n  /** Primary action label; renders only with onAction. */\n  actionLabel?: string;\n  onAction?: () => void;\n  secondaryLabel?: string;\n  onSecondary?: () => void;\n  /** \"page\" centers it with more space; \"inline\" fits inside a Card or list. */\n  size?: \"page\" | \"inline\";\n  className?: string;\n};\n\nfunction EmptyState({\n  icon,\n  title,\n  description,\n  actionLabel,\n  onAction,\n  secondaryLabel,\n  onSecondary,\n  size = \"page\",\n  className,\n}: EmptyStateProps) {\n  return (\n    <div\n      data-slot=\"empty-state\"\n      data-size={size}\n      className={cn(\n        \"flex w-full flex-col items-center text-center\",\n        size === \"page\" ? \"gap-5 px-6 py-16\" : \"gap-4 px-4 py-10\",\n        className,\n      )}\n    >\n      {icon && (\n        <span\n          aria-hidden=\"true\"\n          className={cn(\n            \"flex items-center justify-center rounded-full bg-brand-subtle text-brand\",\n            size === \"page\" ? \"size-16 [&_svg]:size-7\" : \"size-12 [&_svg]:size-5\",\n          )}\n        >\n          {icon}\n        </span>\n      )}\n      <div className=\"flex max-w-sm flex-col gap-1.5\">\n        <h2 className={cn(\"font-semibold\", size === \"page\" ? \"text-xl\" : \"text-base\")}>{title}</h2>\n        {description && <p className=\"text-muted-foreground text-sm\">{description}</p>}\n      </div>\n      {((actionLabel && onAction) || (secondaryLabel && onSecondary)) && (\n        <div className=\"flex w-full max-w-xs flex-col gap-2 sm:w-auto sm:max-w-none sm:flex-row\">\n          {actionLabel && onAction && (\n            <Button size={size === \"page\" ? \"lg\" : \"default\"} onClick={onAction}>\n              {actionLabel}\n            </Button>\n          )}\n          {secondaryLabel && onSecondary && (\n            <Button size={size === \"page\" ? \"lg\" : \"default\"} variant=\"ghost\" onClick={onSecondary}>\n              {secondaryLabel}\n            </Button>\n          )}\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport { EmptyState };\n"
    }
  ]
}
