{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "type": "registry:ui",
  "title": "Empty State",
  "description": "A message and optional action for an empty collection.",
  "dependencies": [],
  "registryDependencies": [
    "https://ghost-ui.com/r/ghost-tokens.json",
    "https://ghost-ui.com/r/utils.json",
    "https://ghost-ui.com/r/foundation.json"
  ],
  "files": [
    {
      "path": "src/components/ui/empty-state.tsx",
      "type": "registry:component",
      "target": "@ui/empty-state.tsx",
      "content": "import \"./foundation.css\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport \"./empty-state.css\";\n\nexport type EmptyStateAlign = \"start\" | \"center\";\nexport type EmptyStateSize = \"sm\" | \"base\";\nexport interface EmptyStateProps extends Omit<\n  React.ComponentPropsWithoutRef<\"div\">,\n  \"title\" | \"align\"\n> {\n  title: React.ReactNode;\n  description?: React.ReactNode;\n  media?: React.ReactNode;\n  /** Give a direct SVG icon a subtle surface. Other media keeps its own size. */\n  mediaBackground?: boolean;\n  action?: React.ReactNode;\n  /** CSS font size for the heading; defaults to the Input font-size token. */\n  titleSize?: React.CSSProperties[\"fontSize\"];\n  headingLevel?: 2 | 3;\n  align?: EmptyStateAlign;\n  size?: EmptyStateSize;\n}\n\n/** A caller-owned empty state with optional media, description, and action. */\nexport function EmptyState({\n  title,\n  description,\n  media,\n  mediaBackground = true,\n  action,\n  titleSize,\n  headingLevel = 2,\n  align = \"center\",\n  size = \"base\",\n  className,\n  ...props\n}: EmptyStateProps) {\n  const Heading = `h${headingLevel}` as \"h2\" | \"h3\";\n  return (\n    <div\n      data-align={align}\n      data-size={size}\n      className={cn(\"ui-empty-state\", className)}\n      {...props}\n    >\n      {media != null && (\n        <div className=\"ui-empty-state-media\" data-background={mediaBackground} aria-hidden=\"true\">\n          {media}\n        </div>\n      )}\n      <Heading className=\"ui-empty-state-title\" style={{ fontSize: titleSize }}>{title}</Heading>\n      {description != null && (\n        <p className=\"ui-empty-state-description\">{description}</p>\n      )}\n      {action != null && <div className=\"ui-empty-state-actions\">{action}</div>}\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/components/ui/empty-state.css",
      "type": "registry:file",
      "target": "@ui/empty-state.css",
      "content": "@import \"./tokens.css\";\n\n.ui-empty-state {\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  width: 100%;\n  max-width: 32rem;\n  min-width: 0;\n  padding-block: 24px;\n}\n.ui-empty-state[data-align=\"center\"] {\n  align-items: center;\n  margin-inline: auto;\n  text-align: center;\n}\n.ui-empty-state[data-size=\"sm\"] {\n  padding-block: 16px;\n}\n.ui-empty-state-media {\n  display: flex;\n  color: var(--muted-foreground);\n  margin-bottom: 12px;\n}\n.ui-empty-state-media:has(> svg) {\n  align-items: center;\n  justify-content: center;\n  width: var(--space-8);\n  height: var(--space-8);\n  border-radius: var(--radius-control-base);\n}\n.ui-empty-state-media[data-background=\"true\"]:has(> svg) {\n  background: var(--secondary);\n}\n.ui-empty-state-media > svg {\n  display: block;\n  width: var(--icon-size);\n  height: var(--icon-size);\n  flex: none;\n  stroke-width: var(--icon-stroke);\n}\n.ui-empty-state-media:empty {\n  display: none;\n}\n.ui-empty-state-title {\n  margin: 0;\n  color: var(--foreground);\n  font-size: var(--font-size-base);\n  line-height: var(--space-5);\n  font-weight: var(--font-weight-regular);\n  overflow-wrap: anywhere;\n}\n.ui-empty-state-description {\n  max-width: 32rem;\n  margin: 4px 0 0;\n  color: var(--muted-foreground);\n  font-size: var(--font-size-xs);\n  line-height: var(--space-5);\n  font-weight: var(--font-weight-regular);\n  overflow-wrap: anywhere;\n}\n.ui-empty-state-actions {\n  display: flex;\n  align-items: center;\n  flex-wrap: wrap;\n  gap: 8px;\n  margin-top: 16px;\n  max-width: 100%;\n  min-width: 0;\n}\n.ui-empty-state[data-align=\"center\"] .ui-empty-state-actions {\n  justify-content: center;\n}\n.ui-empty-state-media + .ui-empty-state-title {\n  margin-top: 0;\n}\n.ui-empty-state-title + .ui-empty-state-actions {\n  margin-top: 16px;\n}\n\n.ui-empty-state-description:empty,\n.ui-empty-state-actions:empty {\n  display: none;\n}\n"
    }
  ]
}
