{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "exit-intent-offer",
  "title": "Exit Intent — Offer",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/exit-intent-offer/ExitIntentOffer.tsx",
      "content": "'use client'\n\nimport { useCallback, useEffect, useState } from 'react'\nimport { ArrowRight, Clock } from 'lucide-react'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport { Separator } from '@/components/ui/separator'\n\nexport function ExitIntentOffer({ storageKey = 'uipkge:exit-intent-seen' }: { storageKey?: string }) {\n  const [open, setOpen] = useState(false)\n\n  const show = useCallback(() => {\n    try {\n      if (window.sessionStorage.getItem(storageKey) === '1') return false\n      window.sessionStorage.setItem(storageKey, '1')\n    } catch {\n      // Blocked storage: it can show once more this page view, never in a loop.\n    }\n    setOpen(true)\n    return true\n  }, [storageKey])\n\n  useEffect(() => {\n    // Only the top edge counts. A pointer leaving left, right, or bottom is\n    // usually someone reaching for a scrollbar or another window.\n    const onPointerOut = (event: MouseEvent) => {\n      if (event.relatedTarget || event.clientY > 4) return\n      if (show()) document.removeEventListener('mouseout', onPointerOut)\n    }\n    document.addEventListener('mouseout', onPointerOut)\n    return () => document.removeEventListener('mouseout', onPointerOut)\n  }, [show])\n\n  return (\n    <div data-slot=\"exit-intent-offer\">\n      <Dialog open={open} onOpenChange={setOpen}>\n        <DialogContent className=\"sm:max-w-md\">\n          <DialogHeader>\n            <Badge variant=\"secondary\" className=\"w-fit gap-1.5\">\n              <Clock className=\"size-3\" aria-hidden=\"true\" />\n              Before you go\n            </Badge>\n            <DialogTitle className=\"mt-3 text-xl leading-snug text-balance\">Take 30 days instead of 14</DialogTitle>\n            <DialogDescription className=\"leading-relaxed\">\n              A full close cycle fits in 30 days and 14 does not, which is the actual reason most trials stall. No card,\n              no call, cancel from the dashboard.\n            </DialogDescription>\n          </DialogHeader>\n\n          <Separator />\n\n          <ul className=\"text-muted-foreground space-y-1.5 text-sm\">\n            <li>· Everything on the Business plan</li>\n            <li>· Connect your real warehouse, read-only</li>\n            <li>· Keep the definitions you author either way</li>\n          </ul>\n\n          <DialogFooter className=\"sm:justify-start\">\n            <Button>\n              Start the 30-day trial\n              <ArrowRight className=\"ml-2 size-4\" aria-hidden=\"true\" />\n            </Button>\n            <Button variant=\"ghost\" onClick={() => setOpen(false)}>\n              No thanks\n            </Button>\n          </DialogFooter>\n        </DialogContent>\n      </Dialog>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/ExitIntentOffer.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/dialog.json",
    "https://uipkge.dev/r/react/separator.json"
  ],
  "description": "Dialog triggered when the pointer leaves toward the browser chrome, offering an extended trial once per session, with a dismissal that is remembered.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "exit-intent"
}