{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lucky-draw-01",
  "title": "Lucky Draw",
  "author": "VenusUI",
  "description": "A giveaway with a slot machine and a prize table.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://venusui.com/r/slot-machine.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/lucky-draw-01/components/lucky-draw-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Gift } from \"lucide-react\"\n\nimport { SlotMachine } from \"@/registry/default/ui/slot-machine\"\n\nconst PRIZES = [\n  { win: \"Three of a kind\", prize: \"A year of Pro, on us\" },\n  { win: \"A pair\", prize: \"20% off your next order\" },\n  { win: \"Anything else\", prize: \"Free shipping this week\" },\n]\n\n/**\n * A giveaway with a slot machine. For real prizes, decide the result on your\n * server and only animate it in the browser.\n */\nexport function LuckyDraw01() {\n  const [result, setResult] = React.useState<string | null>(null)\n\n  return (\n    <section aria-labelledby=\"lucky-draw-01-title\" className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto grid max-w-5xl grid-cols-[minmax(0,1fr)] items-center gap-12 px-4 sm:px-6 lg:grid-cols-2\">\n        <div>\n          <p className=\"inline-flex items-center gap-1.5 text-sm font-medium text-primary\">\n            <Gift aria-hidden=\"true\" className=\"size-4\" />\n            Birthday week\n          </p>\n          <h2 id=\"lucky-draw-01-title\" className=\"mt-2 text-3xl font-semibold tracking-tight text-balance sm:text-4xl\">\n            One pull. Everyone wins something.\n          </h2>\n          <dl className=\"mt-8 divide-y border-y\">\n            {PRIZES.map((row) => (\n              <div key={row.win} className=\"flex justify-between gap-4 py-3 text-sm\">\n                <dt className=\"text-muted-foreground\">{row.win}</dt>\n                <dd className=\"text-right font-medium\">{row.prize}</dd>\n              </div>\n            ))}\n          </dl>\n          <p role=\"status\" className=\"mt-6 min-h-6 text-sm font-medium\">\n            {result}\n          </p>\n        </div>\n        <SlotMachine\n          className=\"mx-auto\"\n          onResult={(symbols, win) => {\n            const pair = new Set(symbols).size === 2\n            setResult(win ? `Jackpot! ${PRIZES[0].prize}.` : pair ? `A pair: ${PRIZES[1].prize.toLowerCase()}.` : `You won ${PRIZES[2].prize.toLowerCase()}.`)\n          }}\n        />\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "cta"
  ],
  "type": "registry:block"
}