{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-calculator",
  "title": "Pricing Calculator",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/pricing-calculator/PricingCalculator.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { ArrowRight, Check, HardDrive, Headphones, KeyRound, ShieldCheck, Users, Zap } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Separator } from '@/components/ui/separator'\nimport { Slider } from '@/components/ui/slider'\nimport { Switch } from '@/components/ui/switch'\n\ninterface RequestTier {\n  label: string\n  requests: number\n  cost: number\n}\n\ninterface StorageTier {\n  label: string\n  gb: number\n  cost: number\n}\n\nconst REQUEST_TIERS: RequestTier[] = [\n  { label: '10K requests', requests: 10_000, cost: 0 },\n  { label: '50K requests', requests: 50_000, cost: 25 },\n  { label: '100K requests', requests: 100_000, cost: 60 },\n  { label: '250K requests', requests: 250_000, cost: 120 },\n  { label: '500K requests', requests: 500_000, cost: 220 },\n  { label: '1M requests', requests: 1_000_000, cost: 400 },\n  { label: '2.5M requests', requests: 2_500_000, cost: 750 },\n  { label: '5M requests', requests: 5_000_000, cost: 1200 },\n]\n\nconst STORAGE_TIERS: StorageTier[] = [\n  { label: '100 GB', gb: 100, cost: 10 },\n  { label: '250 GB', gb: 250, cost: 25 },\n  { label: '500 GB', gb: 500, cost: 45 },\n  { label: '1 TB', gb: 1_000, cost: 80 },\n  { label: '2 TB', gb: 2_000, cost: 150 },\n  { label: '5 TB', gb: 5_000, cost: 320 },\n  { label: '10 TB', gb: 10_000, cost: 580 },\n]\n\nconst SEAT_PRICE = 15\nconst SUPPORT_MANAGER_PRICE = 200\nconst CUSTOM_SLA_PRICE = 500\nconst SSO_PRICE = 100\n\nconst SEAT_MARKS = {\n  1: '1',\n  25: '25',\n  50: '50',\n  75: '75',\n  100: '100',\n}\n\nconst REQUEST_MARKS = {\n  0: '10K',\n  2: '100K',\n  4: '500K',\n  7: '5M',\n}\n\nconst STORAGE_MARKS = {\n  0: '100 GB',\n  2: '500 GB',\n  4: '2 TB',\n  6: '10 TB',\n}\n\nexport function PricingCalculator({ className }: { className?: string }) {\n  const [isAnnual, setIsAnnual] = React.useState(true)\n  const [seats, setSeats] = React.useState(12)\n  const [requestIndex, setRequestIndex] = React.useState(2)\n  const [storageIndex, setStorageIndex] = React.useState(2)\n  const [addonSupport, setAddonSupport] = React.useState(false)\n  const [addonSla, setAddonSla] = React.useState(false)\n  const [addonSso, setAddonSso] = React.useState(true)\n\n  const currentRequestTier = REQUEST_TIERS[requestIndex] ?? REQUEST_TIERS[0]\n  const currentStorageTier = STORAGE_TIERS[storageIndex] ?? STORAGE_TIERS[0]\n\n  const seatTier = React.useMemo(() => {\n    if (seats <= 5) return { label: 'Starter Team', variant: 'secondary' as const }\n    if (seats <= 25) return { label: 'Growth Team', variant: 'outline' as const }\n    return { label: 'Scale Team', variant: 'default' as const }\n  }, [seats])\n\n  const recommendedPlan = React.useMemo(() => {\n    if (addonSla || requestIndex >= 6 || storageIndex >= 5 || seats >= 30) {\n      return { name: 'Enterprise', badge: 'Enterprise Plan', baseFee: 199, variant: 'default' as const }\n    }\n    if (seats >= 8 || requestIndex >= 3 || storageIndex >= 3 || addonSupport) {\n      return { name: 'Growth', badge: 'Growth Plan', baseFee: 79, variant: 'default' as const }\n    }\n    return { name: 'Starter', badge: 'Starter Plan', baseFee: 29, variant: 'secondary' as const }\n  }, [addonSla, requestIndex, storageIndex, seats, addonSupport])\n\n  const baseCost = recommendedPlan.baseFee\n  const seatsCost = seats * SEAT_PRICE\n  const requestsCost = currentRequestTier.cost\n  const storageCost = currentStorageTier.cost\n  const addonsCost =\n    (addonSupport ? SUPPORT_MANAGER_PRICE : 0) + (addonSla ? CUSTOM_SLA_PRICE : 0) + (addonSso ? SSO_PRICE : 0)\n\n  const activeAddonsCount = (addonSupport ? 1 : 0) + (addonSla ? 1 : 0) + (addonSso ? 1 : 0)\n\n  const subtotalMonthly = baseCost + seatsCost + requestsCost + storageCost + addonsCost\n  const discountMultiplier = isAnnual ? 0.8 : 1.0\n  const totalMonthly = Math.round(subtotalMonthly * discountMultiplier)\n  const totalAnnual = totalMonthly * 12\n  const annualSavings = Math.round(subtotalMonthly * 0.2 * 12)\n\n  return (\n    <div\n      data-slot=\"pricing-calculator\"\n      className={cn('mx-auto w-full max-w-6xl space-y-10 p-4 sm:p-6 lg:p-8', className)}\n    >\n      <div className=\"flex flex-col items-center gap-4 text-center\">\n        <Badge variant=\"outline\" className=\"gap-1.5 px-3 py-1 text-xs font-medium tracking-wider uppercase\">\n          <ShieldCheck className=\"text-primary size-3.5\" />\n          Pricing Calculator\n        </Badge>\n        <div className=\"space-y-2\">\n          <h2 className=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl lg:text-4xl\">\n            Interactive Pricing Calculator\n          </h2>\n          <p className=\"text-muted-foreground mx-auto max-w-2xl text-sm sm:text-base\">\n            Calculate your exact monthly or annual investment based on usage.\n          </p>\n        </div>\n\n        <div className=\"border-border bg-card mt-2 inline-flex items-center gap-3 rounded-full border px-4 py-2 shadow-xs\">\n          <span\n            className={cn(\n              'text-xs font-medium transition-colors',\n              !isAnnual ? 'text-foreground font-semibold' : 'text-muted-foreground',\n            )}\n          >\n            Monthly\n          </span>\n          <Switch checked={isAnnual} onCheckedChange={setIsAnnual} />\n          <span\n            className={cn(\n              'text-xs font-medium transition-colors',\n              isAnnual ? 'text-foreground font-semibold' : 'text-muted-foreground',\n            )}\n          >\n            Pay Annually\n          </span>\n          <Badge variant=\"secondary\" className=\"bg-primary/10 text-primary border-primary/20 text-xs font-semibold\">\n            Save 20%\n          </Badge>\n        </div>\n      </div>\n\n      <div className=\"grid grid-cols-1 gap-8 lg:grid-cols-12 lg:items-start\">\n        <div className=\"space-y-6 lg:col-span-7\">\n          <Card>\n            <CardHeader>\n              <CardTitle>Capacity &amp; Scale</CardTitle>\n              <CardDescription>Configure team seats, API request throughput, and dedicated storage.</CardDescription>\n            </CardHeader>\n            <CardContent className=\"space-y-8\">\n              <div className=\"space-y-4\">\n                <div className=\"flex items-center justify-between\">\n                  <div className=\"flex items-center gap-2.5\">\n                    <div className=\"bg-primary/10 text-primary border-primary/20 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                      <Users className=\"size-4\" />\n                    </div>\n                    <div>\n                      <span className=\"text-foreground text-sm font-medium\">Team Seats</span>\n                      <Badge variant={seatTier.variant} className=\"ml-2 text-xs font-normal\">\n                        {seatTier.label}\n                      </Badge>\n                    </div>\n                  </div>\n                  <div className=\"text-right\">\n                    <span className=\"text-foreground text-base font-semibold tabular-nums\">{seats}</span>\n                    <span className=\"text-muted-foreground text-xs\"> seats (${seats * SEAT_PRICE}/mo)</span>\n                  </div>\n                </div>\n                <div className=\"pb-6\">\n                  <Slider\n                    value={[seats]}\n                    min={1}\n                    max={100}\n                    step={1}\n                    marks={SEAT_MARKS}\n                    tooltip={(val) => `${val} seats`}\n                    onValueChange={(val) => setSeats(val[0])}\n                  />\n                </div>\n                <p className=\"text-muted-foreground text-xs\">\n                  Full workspace access, fine-grained permission controls, and audit log tracking for each member.\n                </p>\n              </div>\n\n              <Separator />\n\n              <div className=\"space-y-4\">\n                <div className=\"flex items-center justify-between\">\n                  <div className=\"flex items-center gap-2.5\">\n                    <div className=\"bg-primary/10 text-primary border-primary/20 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                      <Zap className=\"size-4\" />\n                    </div>\n                    <div>\n                      <span className=\"text-foreground text-sm font-medium\">Monthly API Requests</span>\n                    </div>\n                  </div>\n                  <div className=\"text-right\">\n                    <span className=\"text-foreground text-base font-semibold tabular-nums\">\n                      {currentRequestTier.label}\n                    </span>\n                    <span className=\"text-muted-foreground text-xs\">\n                      {' '}\n                      ({currentRequestTier.cost === 0 ? 'Included' : `+$${currentRequestTier.cost}/mo`})\n                    </span>\n                  </div>\n                </div>\n                <div className=\"pb-6\">\n                  <Slider\n                    value={[requestIndex]}\n                    min={0}\n                    max={REQUEST_TIERS.length - 1}\n                    step={1}\n                    marks={REQUEST_MARKS}\n                    tooltip={(idx) => REQUEST_TIERS[idx]?.label ?? ''}\n                    onValueChange={(val) => setRequestIndex(val[0])}\n                  />\n                </div>\n                <p className=\"text-muted-foreground text-xs\">\n                  Globally distributed edge endpoints, automatic rate limiting, and sub-50ms p99 latency SLA.\n                </p>\n              </div>\n\n              <Separator />\n\n              <div className=\"space-y-4\">\n                <div className=\"flex items-center justify-between\">\n                  <div className=\"flex items-center gap-2.5\">\n                    <div className=\"bg-primary/10 text-primary border-primary/20 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                      <HardDrive className=\"size-4\" />\n                    </div>\n                    <div>\n                      <span className=\"text-foreground text-sm font-medium\">Dedicated Cloud Storage</span>\n                    </div>\n                  </div>\n                  <div className=\"text-right\">\n                    <span className=\"text-foreground text-base font-semibold tabular-nums\">\n                      {currentStorageTier.label}\n                    </span>\n                    <span className=\"text-muted-foreground text-xs\"> (+${currentStorageTier.cost}/mo)</span>\n                  </div>\n                </div>\n                <div className=\"pb-6\">\n                  <Slider\n                    value={[storageIndex]}\n                    min={0}\n                    max={STORAGE_TIERS.length - 1}\n                    step={1}\n                    marks={STORAGE_MARKS}\n                    tooltip={(idx) => STORAGE_TIERS[idx]?.label ?? ''}\n                    onValueChange={(val) => setStorageIndex(val[0])}\n                  />\n                </div>\n                <p className=\"text-muted-foreground text-xs\">\n                  Encrypted at rest (AES-256) with multi-region automated replication and daily disaster backups.\n                </p>\n              </div>\n            </CardContent>\n          </Card>\n\n          <Card>\n            <CardHeader>\n              <CardTitle>Enterprise Add-ons</CardTitle>\n              <CardDescription>\n                Enhance your infrastructure with enterprise compliance, reliability, and support.\n              </CardDescription>\n            </CardHeader>\n            <CardContent className=\"space-y-3\">\n              <div className=\"border-border bg-card hover:border-primary/30 flex flex-col justify-between gap-4 rounded-lg border p-4 transition-colors sm:flex-row sm:items-center\">\n                <div className=\"flex items-start gap-3\">\n                  <div className=\"bg-primary/10 text-primary border-primary/20 mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                    <Headphones className=\"size-4\" />\n                  </div>\n                  <div className=\"space-y-0.5\">\n                    <div className=\"flex items-center gap-2\">\n                      <span className=\"text-foreground text-sm font-medium\">Dedicated Support Manager</span>\n                      <Badge variant=\"outline\" className=\"text-xs font-normal\">\n                        +$200/mo\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs\">\n                      Direct Slack channel, named technical account manager &amp; 1-hour response SLA.\n                    </p>\n                  </div>\n                </div>\n                <div className=\"flex sm:justify-end\">\n                  <Switch checked={addonSupport} onCheckedChange={setAddonSupport} />\n                </div>\n              </div>\n\n              <div className=\"border-border bg-card hover:border-primary/30 flex flex-col justify-between gap-4 rounded-lg border p-4 transition-colors sm:flex-row sm:items-center\">\n                <div className=\"flex items-start gap-3\">\n                  <div className=\"bg-primary/10 text-primary border-primary/20 mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                    <ShieldCheck className=\"size-4\" />\n                  </div>\n                  <div className=\"space-y-0.5\">\n                    <div className=\"flex items-center gap-2\">\n                      <span className=\"text-foreground text-sm font-medium\">Custom SLA Guarantee</span>\n                      <Badge variant=\"outline\" className=\"text-xs font-normal\">\n                        +$500/mo\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs\">\n                      99.99% uptime guarantee with financial commitments and priority disaster recovery.\n                    </p>\n                  </div>\n                </div>\n                <div className=\"flex sm:justify-end\">\n                  <Switch checked={addonSla} onCheckedChange={setAddonSla} />\n                </div>\n              </div>\n\n              <div className=\"border-border bg-card hover:border-primary/30 flex flex-col justify-between gap-4 rounded-lg border p-4 transition-colors sm:flex-row sm:items-center\">\n                <div className=\"flex items-start gap-3\">\n                  <div className=\"bg-primary/10 text-primary border-primary/20 mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border\">\n                    <KeyRound className=\"size-4\" />\n                  </div>\n                  <div className=\"space-y-0.5\">\n                    <div className=\"flex items-center gap-2\">\n                      <span className=\"text-foreground text-sm font-medium\">Single Sign-On (SSO / SAML)</span>\n                      <Badge variant=\"outline\" className=\"text-xs font-normal\">\n                        +$100/mo\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs\">\n                      Okta, Azure AD, Google Workspace, and SAML 2.0 enterprise identity integration.\n                    </p>\n                  </div>\n                </div>\n                <div className=\"flex sm:justify-end\">\n                  <Switch checked={addonSso} onCheckedChange={setAddonSso} />\n                </div>\n              </div>\n            </CardContent>\n          </Card>\n        </div>\n\n        <div className=\"lg:sticky lg:top-8 lg:col-span-5\">\n          <Card className=\"border-border bg-card shadow-xs\">\n            <CardHeader className=\"pb-4\">\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground text-xs font-semibold tracking-wider uppercase\">\n                  Estimated Investment\n                </span>\n                <Badge variant={recommendedPlan.variant} className=\"gap-1 shadow-xs\">\n                  {recommendedPlan.name === 'Enterprise' && <ShieldCheck className=\"size-3\" />}\n                  {recommendedPlan.badge}\n                </Badge>\n              </div>\n              <div className=\"mt-4\">\n                <div className=\"flex items-baseline gap-1.5\">\n                  <span className=\"text-foreground text-4xl font-bold tracking-tight tabular-nums sm:text-5xl\">\n                    ${totalMonthly}\n                  </span>\n                  <span className=\"text-muted-foreground text-sm font-normal\"> / month</span>\n                </div>\n                {isAnnual ? (\n                  <p className=\"text-muted-foreground mt-2 text-xs\">\n                    Billed annually (${totalAnnual.toLocaleString('en-US')}/yr) ·\n                    <span className=\"text-success font-semibold\">\n                      {' '}\n                      Save ${annualSavings.toLocaleString('en-US')}/yr\n                    </span>\n                  </p>\n                ) : (\n                  <p className=\"text-muted-foreground mt-2 text-xs\">\n                    Billed monthly · Switch to annual to save 20% (${annualSavings.toLocaleString('en-US')}/yr)\n                  </p>\n                )}\n              </div>\n            </CardHeader>\n            <CardContent className=\"space-y-4\">\n              <Separator />\n              <div className=\"space-y-2.5\">\n                <div className=\"flex items-center justify-between text-sm\">\n                  <span className=\"text-muted-foreground\">Base platform ({recommendedPlan.name})</span>\n                  <span className=\"font-medium tabular-nums\">\n                    ${isAnnual ? Math.round(baseCost * 0.8) : baseCost}/mo\n                  </span>\n                </div>\n                <div className=\"flex items-center justify-between text-sm\">\n                  <span className=\"text-muted-foreground\">\n                    Team seats ({seats} × ${SEAT_PRICE})\n                  </span>\n                  <span className=\"font-medium tabular-nums\">\n                    ${isAnnual ? Math.round(seatsCost * 0.8) : seatsCost}/mo\n                  </span>\n                </div>\n                <div className=\"flex items-center justify-between text-sm\">\n                  <span className=\"text-muted-foreground\">API throughput ({currentRequestTier.label})</span>\n                  <span className=\"font-medium tabular-nums\">\n                    {requestsCost === 0\n                      ? 'Included'\n                      : `$${isAnnual ? Math.round(requestsCost * 0.8) : requestsCost}/mo`}\n                  </span>\n                </div>\n                <div className=\"flex items-center justify-between text-sm\">\n                  <span className=\"text-muted-foreground\">Cloud storage ({currentStorageTier.label})</span>\n                  <span className=\"font-medium tabular-nums\">\n                    ${isAnnual ? Math.round(storageCost * 0.8) : storageCost}/mo\n                  </span>\n                </div>\n                <div className=\"flex items-center justify-between text-sm\">\n                  <span className=\"text-muted-foreground\">Add-ons ({activeAddonsCount} active)</span>\n                  <span className=\"font-medium tabular-nums\">\n                    {addonsCost === 0 ? '$0/mo' : `$${isAnnual ? Math.round(addonsCost * 0.8) : addonsCost}/mo`}\n                  </span>\n                </div>\n                {isAnnual && (\n                  <div className=\"bg-success/10 text-success flex items-center justify-between rounded-md px-2.5 py-1.5 text-xs font-medium\">\n                    <span>Annual discount applied</span>\n                    <span className=\"font-semibold tabular-nums\">20% off</span>\n                  </div>\n                )}\n              </div>\n              <Separator />\n              <ul className=\"text-muted-foreground space-y-2 text-xs\">\n                <li className=\"flex items-center gap-2\">\n                  <Check className=\"text-primary size-3.5 shrink-0\" />\n                  <span>14-day fully featured free trial</span>\n                </li>\n                <li className=\"flex items-center gap-2\">\n                  <Check className=\"text-primary size-3.5 shrink-0\" />\n                  <span>No credit card required upfront</span>\n                </li>\n                <li className=\"flex items-center gap-2\">\n                  <Check className=\"text-primary size-3.5 shrink-0\" />\n                  <span>Zero-downtime migration assistance</span>\n                </li>\n              </ul>\n            </CardContent>\n            <CardFooter className=\"flex flex-col gap-2.5 pt-2\">\n              <Button className=\"w-full gap-2 font-semibold shadow-xs\" size=\"lg\">\n                Start 14-Day Free Trial\n                <ArrowRight className=\"size-4\" />\n              </Button>\n              <Button variant=\"outline\" className=\"w-full\" size=\"default\">\n                Request Custom Quote\n              </Button>\n            </CardFooter>\n          </Card>\n        </div>\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/PricingCalculator.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/slider.json",
    "https://uipkge.dev/r/react/switch.json"
  ],
  "description": "Interactive SaaS and API pricing calculator with dynamic seat, request throughput, and cloud storage sliders, annual billing toggle with 20% discount, enterprise add-on switches, automated tier recommendation, and sticky live estimated cost breakdown.",
  "categories": [
    "marketing",
    "billing"
  ],
  "deprecated": true,
  "replacedBy": "pricing"
}