{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "title": "Empty State",
  "description": "What a list, table or page shows when it has nothing in it yet, with an icon, title, description and actions.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/empty-state.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n\nconst emptyStateVariants = cva(\n  \"flex w-full flex-col items-center justify-center gap-2 rounded-lg p-8 text-center\",\n  {\n    variants: {\n      variant: {\n        plain: \"\",\n        dashed: \"border border-dashed\",\n      },\n    },\n    defaultVariants: {\n      variant: \"dashed\",\n    },\n  }\n);\n\ninterface EmptyStateProps extends ComponentProps<\"div\">, VariantProps<typeof emptyStateVariants> {}\n\n/**\n * What a list, table or page shows when there is nothing in it yet: an icon,\n * a title, a line of explanation and the action that fills it. It is a plain\n * block, not a live region, so it is read in page order like the rest of the\n * content; the title is a real heading, so it shows up in the headings list.\n * `variant=\"dashed\"` (the default) draws a dashed border around it,\n * `variant=\"plain\"` leaves it bare. Nothing animates.\n *\n * @example\n * <EmptyState>\n *   <EmptyStateIcon>\n *     <InboxIcon />\n *   </EmptyStateIcon>\n *   <EmptyStateTitle>No messages</EmptyStateTitle>\n *   <EmptyStateDescription>New messages from your crew show up here.</EmptyStateDescription>\n *   <EmptyStateActions>\n *     <Button>Write a message</Button>\n *   </EmptyStateActions>\n * </EmptyState>\n */\nfunction EmptyState({ className, variant, ...props }: EmptyStateProps) {\n  return (\n    <div\n      data-slot=\"empty-state\"\n      data-variant={variant ?? \"dashed\"}\n      className={cn(emptyStateVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\n/** A round muted badge around an icon. Decorative: it is hidden from screen readers. */\nfunction EmptyStateIcon({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"empty-state-icon\"\n      aria-hidden=\"true\"\n      className={cn(\n        \"bg-muted text-muted-foreground mb-2 flex size-12 shrink-0 items-center justify-center rounded-full\",\n        \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6\",\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\ninterface EmptyStateTitleProps extends ComponentProps<\"h2\"> {\n  /** Heading level, to fit the outline of the page it sits in. */\n  as?: \"h2\" | \"h3\" | \"h4\";\n}\n\n/** The heading of the empty state: an `<h2>` unless `as` picks another level. */\nfunction EmptyStateTitle({ as: Comp = \"h2\", className, ...props }: EmptyStateTitleProps) {\n  return (\n    <Comp\n      data-slot=\"empty-state-title\"\n      className={cn(\"text-lg font-semibold tracking-tight text-balance\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction EmptyStateDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"empty-state-description\"\n      className={cn(\"text-muted-foreground max-w-sm text-sm text-balance\", className)}\n      {...props}\n    />\n  );\n}\n\n/** A row of buttons or links below the text, wrapping on narrow screens. */\nfunction EmptyStateActions({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"empty-state-actions\"\n      className={cn(\"mt-4 flex flex-wrap items-center justify-center gap-2\", className)}\n      {...props}\n    />\n  );\n}\n\nexport {\n  EmptyState,\n  EmptyStateActions,\n  EmptyStateDescription,\n  EmptyStateIcon,\n  EmptyStateTitle,\n  emptyStateVariants,\n  type EmptyStateProps,\n  type EmptyStateTitleProps,\n};\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}