{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "giveaway-01",
  "title": "Giveaway Section",
  "author": "VenusUI",
  "description": "A spin-to-win giveaway with the rules and an email form to claim the prize.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input",
    "https://venusui.com/r/prize-wheel.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/giveaway-01/components/giveaway-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Gift } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { Input } from \"@/components/ui/input\"\nimport { PrizeWheel, type WheelSegment } from \"@/registry/default/ui/prize-wheel\"\n\nconst segments: WheelSegment[] = [\n  { label: \"10% off\", color: \"#f43f5e\" },\n  { label: \"Free tote\", color: \"#f59e0b\" },\n  { label: \"5% off\", color: \"#10b981\" },\n  { label: \"Free ship\", color: \"#3b82f6\" },\n  { label: \"20% off\", color: \"#a855f7\" },\n  { label: \"Sticker\", color: \"#14b8a6\" },\n  { label: \"15% off\", color: \"#ec4899\" },\n  { label: \"Mystery\", color: \"#6366f1\" },\n]\n\nconst rules = [\"One spin per person, this weekend only.\", \"Prizes apply to orders over $30.\", \"Your code arrives by email and lasts 14 days.\"]\n\n/** A spin-to-win giveaway: the wheel, the rules, and an email form to claim the prize. */\nexport function Giveaway01() {\n  const [prize, setPrize] = React.useState<string | null>(null)\n  const [claimed, setClaimed] = React.useState(false)\n  const id = React.useId()\n\n  return (\n    <section aria-labelledby={`${id}-title`} className=\"relative isolate overflow-hidden py-24 sm:py-28\">\n      <div aria-hidden=\"true\" className=\"absolute inset-0 -z-10 bg-[radial-gradient(60%_60%_at_30%_40%,rgb(244_63_94/0.12),transparent),radial-gradient(50%_50%_at_80%_60%,rgb(99_102_241/0.12),transparent)]\" />\n      <div className=\"mx-auto grid max-w-5xl items-center gap-14 px-4 sm:px-6 lg:grid-cols-2\">\n        <div className=\"flex justify-center\">\n          <PrizeWheel className=\"w-[min(22rem,calc(100vw-3rem))]\" segments={segments} onResult={(s) => setPrize(s.label)} />\n        </div>\n\n        <div>\n          <p className=\"inline-flex items-center gap-2 text-sm font-medium text-rose-600 dark:text-rose-400\">\n            <Gift aria-hidden=\"true\" className=\"size-4\" /> Weekend giveaway\n          </p>\n          <h2 id={`${id}-title`} className=\"mt-3 text-4xl font-semibold tracking-tight text-balance sm:text-5xl\">\n            Spin to win something nice.\n          </h2>\n          <p className=\"mt-4 text-muted-foreground\">Every spin wins: discounts, free shipping or a little extra in your next box.</p>\n          <ul className=\"mt-6 space-y-2 text-sm text-muted-foreground\">\n            {rules.map((rule) => (\n              <li key={rule} className=\"flex gap-2\">\n                <span aria-hidden=\"true\" className=\"mt-2 size-1.5 shrink-0 rounded-full bg-rose-500\" />\n                {rule}\n              </li>\n            ))}\n          </ul>\n\n          <div className=\"mt-8 rounded-2xl border bg-card p-5\">\n            {claimed ? (\n              <p role=\"status\" className=\"text-sm\">\n                Done! Your <strong>{prize}</strong> code is on its way to your inbox.\n              </p>\n            ) : prize ? (\n              <form\n                onSubmit={(event) => {\n                  event.preventDefault()\n                  setClaimed(true)\n                }}\n              >\n                <label htmlFor={`${id}-email`} className=\"text-sm font-medium\">\n                  You won <strong>{prize}</strong>! Where should we send it?\n                </label>\n                <div className=\"mt-3 flex flex-col gap-2 sm:flex-row\">\n                  <Input id={`${id}-email`} type=\"email\" required autoComplete=\"email\" placeholder=\"you@example.com\" />\n                  <Button type=\"submit\">Claim prize</Button>\n                </div>\n              </form>\n            ) : (\n              <p className=\"text-sm text-muted-foreground\">Press Spin on the wheel to see what you win.</p>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "cta"
  ],
  "type": "registry:block"
}