{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-qr-code",
  "title": "Qr Code",
  "description": "QR code placeholder — adaptado Kibo.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/ds/ds-qr-code.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n// ── Types ──────────────────────────────────────────────────────────────────\n\nexport interface QrCodeProps extends React.HTMLAttributes<HTMLDivElement> {\n  value: string\n  size?: number\n}\n\n// ── Component ──────────────────────────────────────────────────────────────\n\nexport function QrCode({\n  className,\n  value,\n  size = 128,\n  ...props\n}: QrCodeProps) {\n  // Simple placeholder QR using canvas pattern (no external dep)\n  const canvasRef = React.useRef<HTMLCanvasElement>(null)\n\n  React.useEffect(() => {\n    const canvas = canvasRef.current\n    if (!canvas) return\n    const ctx = canvas.getContext(\"2d\")\n    if (!ctx) return\n    ctx.clearRect(0, 0, size, size)\n    ctx.fillStyle = \"black\"\n    // Simple deterministic pattern from value hash\n    let hash = 0\n    for (let i = 0; i < value.length; i++)\n      hash = (hash * 31 + value.charCodeAt(i)) % 1000\n    const cell = size / 21\n    for (let y = 0; y < 21; y++) {\n      for (let x = 0; x < 21; x++) {\n        const v = (hash + x * 13 + y * 7) % 3 === 0\n        if (v) ctx.fillRect(x * cell, y * cell, cell, cell)\n      }\n    }\n  }, [value, size])\n\n  return (\n    <div\n      data-slot=\"qr-code\"\n      // QR requires white background for scannability — exempt from token rule\n      className={cn(\"rounded-2xl border bg-white p-3\", className)}\n      {...props}\n    >\n      <canvas\n        ref={canvasRef}\n        width={size}\n        height={size}\n        className=\"size-full\"\n        aria-label={`QR for ${value}`}\n      />\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
