{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-13",
  "type": "registry:block",
  "description": "Pay-as-you-go credit pack selector with per-100 rates, bonus badges and a live total purchase bar.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/pricing/pricing-13.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Coins,\n  Infinity as InfinityIcon,\n  Sparkles,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst packs = [\n  { credits: 500, price: 10, bonus: 0, renders: \"~120 image renders\" },\n  { credits: 2000, price: 36, bonus: 10, renders: \"~520 image renders\" },\n  { credits: 6000, price: 96, bonus: 20, renders: \"~1,700 image renders\", best: true },\n  { credits: 20000, price: 280, bonus: 30, renders: \"~6,200 image renders\" },\n]\n\nexport default function Pricing13() {\n  const [selected, setSelected] = useState(2)\n  const pack = packs[selected]!\n  const total = Math.round(pack.credits * (1 + pack.bonus / 100))\n\n  return (\n    <section className=\"w-full bg-background py-20 md:py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"flex flex-col gap-4 md:flex-row md:items-end md:justify-between\">\n          <div>\n            <p className=\"flex items-center gap-2 text-xs tracking-[0.2em] text-muted-foreground uppercase\">\n              <Coins className=\"size-4\" />\n              Credit packs\n            </p>\n            <h2 className=\"mt-4 text-3xl font-semibold tracking-tight md:text-4xl\">\n              Pay as you go. No subscription.\n            </h2>\n          </div>\n          <p className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n            <InfinityIcon className=\"size-4\" />\n            Credits never expire\n          </p>\n        </div>\n        <div className=\"mt-10 grid grid-cols-2 gap-3 lg:grid-cols-4\">\n          {packs.map((item, index) => (\n            <button\n              key={item.credits}\n              type=\"button\"\n              aria-pressed={selected === index}\n              onClick={() => setSelected(index)}\n              className={cn(\n                \"relative flex flex-col border p-5 text-start transition-colors md:p-6\",\n                selected === index\n                  ? \"border-foreground bg-muted/50\"\n                  : \"border-border hover:border-foreground/40\"\n              )}\n            >\n              {item.best && (\n                <span className=\"absolute -top-2.5 left-5 flex items-center gap-1 bg-foreground px-2 py-0.5 text-[10px] tracking-wider text-background uppercase\">\n                  <Sparkles className=\"size-3\" />\n                  Best value\n                </span>\n              )}\n              <span className=\"text-2xl font-semibold tracking-tight md:text-3xl\">\n                {item.credits.toLocaleString(\"en-US\")}\n              </span>\n              <span className=\"text-xs text-muted-foreground\">credits</span>\n              <span className=\"mt-6 text-lg font-medium\">${item.price}</span>\n              <span className=\"text-xs text-muted-foreground\">\n                ${((item.price / item.credits) * 100).toFixed(2)} per 100\n              </span>\n              {item.bonus > 0 && (\n                <span className=\"mt-4 w-fit bg-primary/10 px-2 py-0.5 text-xs font-medium text-chart-3 dark:text-primary\">\n                  +{item.bonus}% bonus\n                </span>\n              )}\n            </button>\n          ))}\n        </div>\n        <div className=\"mt-6 flex flex-col gap-6 border border-border bg-card p-6 md:flex-row md:items-center md:justify-between md:p-8\">\n          <div>\n            <p className=\"text-sm text-muted-foreground\">You receive</p>\n            <p className=\"mt-1 text-2xl font-semibold tracking-tight\">\n              {total.toLocaleString(\"en-US\")} credits\n            </p>\n            <p className=\"mt-1 text-sm text-muted-foreground\">{pack.renders}</p>\n          </div>\n          <Button size=\"lg\" className=\"md:w-56\">\n            Buy for ${pack.price}\n          </Button>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "550px"
  },
  "categories": [
    "pricing"
  ]
}