{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "title": "Empty State",
  "description": "A friendly empty, no-results or error placeholder with 5 icon presets, a floating icon tile, title, description and actions, in plain, card and dashed styles with a staggered entrance.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/empty-state/empty-state.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport type EmptyStatePreset = \"inbox\" | \"search\" | \"folder\" | \"cart\" | \"error\";\nexport type EmptyStateVariant = \"plain\" | \"card\" | \"dashed\";\nexport type EmptyStateSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface EmptyStateProps {\n  preset?: EmptyStatePreset;\n  icon?: React.ReactNode;\n  title?: React.ReactNode;\n  description?: React.ReactNode;\n  action?: React.ReactNode;\n  secondaryAction?: React.ReactNode;\n  variant?: EmptyStateVariant;\n  size?: EmptyStateSize;\n  theme?: \"dark\" | \"light\";\n  float?: boolean;\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.55)\", border: \"rgba(255,255,255,0.1)\", card: \"#0E0E0E\", tile: \"rgba(255,255,255,0.05)\", tileBorder: \"rgba(255,255,255,0.1)\", icon: \"rgba(245,244,241,0.85)\" },\n  light: { text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.55)\", border: \"rgba(10,10,10,0.14)\", card: \"#FFFFFF\", tile: \"rgba(10,10,10,0.04)\", tileBorder: \"rgba(10,10,10,0.1)\", icon: \"rgba(10,10,10,0.8)\" },\n};\n\nconst SIZES: Record<EmptyStateSize, { tile: number; icon: number; title: number; desc: number; gap: number; pad: number; maxWidth: number }> = {\n  sm: { tile: 52, icon: 24, title: 15, desc: 13, gap: 14, pad: 28, maxWidth: 300 },\n  md: { tile: 68, icon: 30, title: 18, desc: 14, gap: 18, pad: 40, maxWidth: 380 },\n  lg: { tile: 88, icon: 38, title: 22, desc: 15.5, gap: 22, pad: 56, maxWidth: 460 },\n};\n\nconst DEFAULTS: Record<EmptyStatePreset, { title: string; description: string }> = {\n  inbox: { title: \"Your inbox is empty\", description: \"New messages will show up here. Enjoy the quiet while it lasts.\" },\n  search: { title: \"No results found\", description: \"Try a different keyword or remove some filters to see more results.\" },\n  folder: { title: \"No files yet\", description: \"Upload a file or create a new folder to get started.\" },\n  cart: { title: \"Your cart is empty\", description: \"Looks like you haven't added anything yet. Browse the catalog to find something you like.\" },\n  error: { title: \"Something went wrong\", description: \"We couldn't load this content. Check your connection and try again.\" },\n};\n\nfunction PresetIcon({ preset, size }: { preset: EmptyStatePreset; size: number }) {\n  const common = { width: size, height: size, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\" as const, strokeLinejoin: \"round\" as const, \"aria-hidden\": true };\n  switch (preset) {\n    case \"search\":\n      return (\n        <svg {...common}>\n          <circle cx=\"10.5\" cy=\"10.5\" r=\"6.2\" />\n          <path d=\"M15.2 15.2L20 20\" />\n          <path d=\"M8 10.5h5\" />\n        </svg>\n      );\n    case \"folder\":\n      return (\n        <svg {...common}>\n          <path d=\"M3.5 7.5a2 2 0 0 1 2-2h4l2 2.2h7a2 2 0 0 1 2 2V17a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z\" />\n          <path d=\"M12 11.5v4M10 13.5h4\" />\n        </svg>\n      );\n    case \"cart\":\n      return (\n        <svg {...common}>\n          <path d=\"M3.5 4.5h2.2l1.6 9.2a1.6 1.6 0 0 0 1.6 1.3h7.5a1.6 1.6 0 0 0 1.6-1.2l1.3-5.3H6.6\" />\n          <circle cx=\"9.5\" cy=\"19\" r=\"1.2\" />\n          <circle cx=\"16.5\" cy=\"19\" r=\"1.2\" />\n        </svg>\n      );\n    case \"error\":\n      return (\n        <svg {...common}>\n          <path d=\"M12 3.5l9 15.5H3z\" />\n          <path d=\"M12 9.5v4.2M12 16.6v.1\" />\n        </svg>\n      );\n    default:\n      return (\n        <svg {...common}>\n          <path d=\"M3.5 13.5l2.4-7.2a2 2 0 0 1 1.9-1.4h8.4a2 2 0 0 1 1.9 1.4l2.4 7.2\" />\n          <path d=\"M3.5 13.5V18a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5v-4.5h-5.2a1.8 1.8 0 0 0-1.7 1.2 1.8 1.8 0 0 1-1.7 1.2 1.8 1.8 0 0 1-1.7-1.2 1.8 1.8 0 0 0-1.7-1.2z\" />\n        </svg>\n      );\n  }\n}\n\nexport function EmptyState({ preset = \"inbox\", icon, title, description, action, secondaryAction, variant = \"plain\", size = \"md\", theme = \"dark\", float = true, className }: EmptyStateProps) {\n  const p = PALETTES[theme];\n  const s = SIZES[size];\n  const reduced = useReducedMotion() ?? false;\n  const d = DEFAULTS[preset];\n  const heading = title === undefined ? d.title : title;\n  const body = description === undefined ? d.description : description;\n  const rise = (delay: number) => ({ initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay, ease: [0.16, 1, 0.3, 1] as const } });\n\n  return (\n    <div\n      role=\"status\"\n      className={cn(\"flex flex-col items-center text-center\", className)}\n      style={{\n        gap: s.gap,\n        padding: variant === \"plain\" ? 0 : s.pad,\n        maxWidth: \"100%\",\n        width: variant === \"plain\" ? undefined : s.maxWidth + s.pad * 2,\n        borderRadius: 22,\n        background: variant === \"card\" ? p.card : \"transparent\",\n        border: variant === \"card\" ? `1px solid ${p.border}` : variant === \"dashed\" ? `1.5px dashed ${p.border}` : undefined,\n        fontFamily: \"Inter, sans-serif\",\n        color: p.text,\n      }}\n    >\n      <motion.div className=\"relative flex items-center justify-center\" {...rise(0)}>\n        <motion.span\n          className=\"relative flex items-center justify-center\"\n          style={{ width: s.tile, height: s.tile, borderRadius: s.tile * 0.32, background: p.tile, border: `1px solid ${p.tileBorder}`, color: p.icon }}\n          animate={float && !reduced ? { y: [0, -5, 0] } : undefined}\n          transition={float && !reduced ? { duration: 3.4, ease: \"easeInOut\", repeat: Infinity } : undefined}\n        >\n          {icon ?? <PresetIcon preset={preset} size={s.icon} />}\n        </motion.span>\n      </motion.div>\n\n      {(heading || body) && (\n        <motion.div style={{ maxWidth: s.maxWidth }} {...rise(0.08)}>\n          {heading && (\n            <h3 className=\"m-0 font-semibold tracking-[-0.015em]\" style={{ fontSize: s.title, lineHeight: 1.3 }}>\n              {heading}\n            </h3>\n          )}\n          {body && (\n            <p className=\"m-0\" style={{ marginTop: 8, fontSize: s.desc, lineHeight: 1.6, color: p.muted }}>\n              {body}\n            </p>\n          )}\n        </motion.div>\n      )}\n\n      {(action || secondaryAction) && (\n        <motion.div className=\"flex flex-wrap items-center justify-center gap-2.5\" {...rise(0.16)}>\n          {action}\n          {secondaryAction}\n        </motion.div>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}