{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lib/icon-placeholder",
  "title": "Icon Placeholder",
  "description": "Abstraction layer for icon library switching",
  "dependencies": [
    "@remixicon/react"
  ],
  "registryDependencies": [
    "lib/utils"
  ],
  "files": [
    {
      "path": "registry/lib/icon-placeholder.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type IconLibrary = \"lucide\" | \"remixicon\" | \"tabler\" | \"phosphor\" | \"hugeicons\";\n\nexport interface IconPlaceholderProps extends Omit<React.SVGProps<SVGSVGElement>, \"name\"> {\n  lucide?: string;\n  remixicon?: string;\n  tabler?: string;\n  phosphor?: string;\n  hugeicons?: string;\n}\n\nexport type IconRenderer = (\n  name: string,\n  props: React.SVGProps<SVGSVGElement>,\n) => React.ReactNode | null;\n\nconst renderers = new Map<IconLibrary, IconRenderer>();\nlet activeLibrary: IconLibrary = \"remixicon\";\n\nexport function registerIconRenderer(library: IconLibrary, renderer: IconRenderer) {\n  renderers.set(library, renderer);\n}\n\nexport function setActiveIconLibrary(library: IconLibrary) {\n  activeLibrary = library;\n}\n\nexport function getActiveIconLibrary(): IconLibrary {\n  return activeLibrary;\n}\n\nexport function IconPlaceholder({\n  lucide,\n  remixicon,\n  tabler,\n  phosphor,\n  hugeicons,\n  ...svgProps\n}: IconPlaceholderProps) {\n  const libraryNames: Record<IconLibrary, string | undefined> = {\n    lucide,\n    remixicon,\n    tabler,\n    phosphor,\n    hugeicons,\n  };\n\n  const renderer = renderers.get(activeLibrary);\n  const iconName = libraryNames[activeLibrary];\n\n  if (renderer && iconName) {\n    return <>{renderer(iconName, svgProps)}</>;\n  }\n\n  // Fallback: empty SVG placeholder\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...svgProps}\n    />\n  );\n}\n",
      "type": "registry:lib"
    },
    {
      "path": "registry/lib/icon-renderer.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { registerIconRenderer } from \"@/lib/icon-placeholder\";\n\nfunction RemixIconRenderer(\n  name: string,\n  props: React.SVGProps<SVGSVGElement>,\n): React.ReactNode | null {\n  // Convert RiArrowDownSLine → ri-arrow-down-s-line (CSS class format)\n  const iconClass = name\n    .replace(/^Ri/, \"ri-\")\n    .replace(/([A-Z])/g, (m) => `-${m.toLowerCase()}`)\n    .replace(/^ri--/, \"ri-\")\n    .toLowerCase();\n\n  const { className, style, ...rest } = props;\n  const combinedClass = iconClass + (className ? ` ${className}` : \"\");\n\n  return (\n    <i\n      className={combinedClass}\n      aria-hidden=\"true\"\n      style={style}\n      {...(rest as React.HTMLAttributes<HTMLElement>)}\n    />\n  );\n}\n\nregisterIconRenderer(\"remixicon\", RemixIconRenderer);\n\nexport { RemixIconRenderer };\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:lib"
}