{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "title": "Empty State",
  "description": "Explains an empty or failed view and offers the next step or a retry.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "@ikas/button",
    "@ikas/status",
    "@ikas/utils"
  ],
  "files": [
    {
      "path": "registry/ikas/empty-state.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { OctagonAlertIcon, RotateCwIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { statusTint } from \"@/lib/status\"\nimport { Button } from \"@/components/ui/button\"\n\nconst emptyStateVariants = cva(\"flex w-full flex-col items-center text-center\", {\n  variants: {\n    /** page for first run, section inside cards, inline in small panels. */\n    size: {\n      /** First run of a whole page, e.g. \"No campaigns yet\". */\n      page: \"gap-4 px-6 py-16\",\n      /** Inside a card or table with no results. */\n      section: \"gap-3 px-6 py-10\",\n      /** Inside small containers like popovers or side panels. */\n      inline: \"gap-2 px-4 py-6\",\n    },\n  },\n  defaultVariants: {\n    size: \"section\",\n  },\n})\n\ntype EmptyStateProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n  VariantProps<typeof emptyStateVariants> & {\n    /** A lucide icon element or a small illustration. */\n    media?: React.ReactNode\n    title: React.ReactNode\n    description?: React.ReactNode\n    /** Primary action first, secondary second. */\n    actions?: React.ReactNode\n    /** Small print under the actions, e.g. a docs link. */\n    footer?: React.ReactNode\n    /**\n     * danger: the view failed to load. Tints the media tile, defaults the icon\n     * and announces the message (role=\"alert\"). Pair it with `onRetry`.\n     */\n    status?: \"neutral\" | \"danger\"\n    /** Shows a \"Tekrar dene\" button before `actions`. */\n    onRetry?: () => void\n    /** Label for the retry button. */\n    retryLabel?: string\n    /** Spinner on the retry button while the request runs. */\n    retrying?: boolean\n  }\n\n/** No data yet, no results, or a failed load (status=\"danger\"). */\nfunction EmptyState({\n  className,\n  size = \"section\",\n  media,\n  title,\n  description,\n  actions,\n  footer,\n  status = \"neutral\",\n  onRetry,\n  retryLabel = \"Tekrar dene\",\n  retrying = false,\n  ...props\n}: EmptyStateProps) {\n  const danger = status === \"danger\"\n  const icon = media ?? (danger ? <OctagonAlertIcon /> : null)\n\n  return (\n    <div\n      data-slot=\"empty-state\"\n      data-size={size}\n      data-status={status}\n      role={danger ? \"alert\" : undefined}\n      className={cn(emptyStateVariants({ size }), className)}\n      {...props}\n    >\n      {icon && (\n        <div\n          data-slot=\"empty-state-media\"\n          className={cn(\n            \"flex items-center justify-center rounded-xl [&_svg]:shrink-0\",\n            danger\n              ? cn(statusTint.danger, \"bg-(--s-subtle) text-(--s-icon) shadow-[inset_0_0_0_1px_var(--s-border)]\")\n              : \"border bg-muted text-icon\",\n            size === \"page\" && \"size-14 [&_svg:not([class*='size-'])]:size-6\",\n            size === \"section\" && \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n            size === \"inline\" && \"size-9 [&_svg:not([class*='size-'])]:size-4\"\n          )}\n        >\n          {icon}\n        </div>\n      )}\n      <div className=\"flex max-w-sm flex-col gap-1\">\n        <h3\n          className={cn(\n            \"font-heading font-semibold text-foreground\",\n            size === \"page\" ? \"text-lg\" : size === \"section\" ? \"text-[15px]\" : \"text-sm\"\n          )}\n        >\n          {title}\n        </h3>\n        {description && (\n          <p className={cn(\"text-muted-foreground\", size === \"inline\" ? \"text-[13px]\" : \"text-sm\")}>{description}</p>\n        )}\n      </div>\n      {(onRetry || actions) && (\n        <div className=\"mt-1 flex flex-wrap items-center justify-center gap-2\">\n          {onRetry && (\n            <Button variant=\"outline\" size={size === \"inline\" ? \"sm\" : \"default\"} loading={retrying} onClick={onRetry}>\n              <RotateCwIcon data-icon=\"inline-start\" data-anim=\"spin\" />\n              {retryLabel}\n            </Button>\n          )}\n          {actions}\n        </div>\n      )}\n      {footer && <div className=\"text-[13px] text-muted-foreground [&_a]:text-primary [&_a]:hover:underline\">{footer}</div>}\n    </div>\n  )\n}\n\nexport { EmptyState, emptyStateVariants, type EmptyStateProps }\n",
      "type": "registry:component",
      "target": "@components/ikas/empty-state.tsx"
    }
  ],
  "docs": "https://builders.ikas.com/tr/docs/app-development/ui-kit/components/empty-state",
  "categories": [
    "feedback"
  ],
  "type": "registry:component"
}