{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "exit-intent-offer",
  "title": "Exit Intent — Offer",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/exit-intent-offer/ExitIntentOffer.vue",
      "content": "<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { ArrowRight, Clock } from 'lucide-vue-next'\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\nconst props = withDefaults(defineProps<{ storageKey?: string }>(), {\n  storageKey: 'uipkge:exit-intent-seen',\n})\n\nconst open = ref(false)\n\n// Only the top edge counts. A pointer leaving left, right, or bottom is usually\n// someone reaching for a scrollbar or another window, not leaving the page.\nfunction onPointerOut(event: MouseEvent) {\n  if (event.relatedTarget || event.clientY > 4) return\n  show()\n}\n\nfunction show() {\n  try {\n    if (window.sessionStorage.getItem(props.storageKey) === '1') return\n    window.sessionStorage.setItem(props.storageKey, '1')\n  } catch {\n    // Blocked storage: it can show once more this page view, never in a loop.\n  }\n  open.value = true\n  document.removeEventListener('mouseout', onPointerOut)\n}\n\nonMounted(() => document.addEventListener('mouseout', onPointerOut))\nonBeforeUnmount(() => document.removeEventListener('mouseout', onPointerOut))\n</script>\n\n<template>\n  <div data-slot=\"exit-intent-offer\">\n    <Dialog v-model:open=\"open\">\n      <DialogContent class=\"sm:max-w-md\">\n        <DialogHeader>\n          <Badge variant=\"secondary\" class=\"w-fit gap-1.5\">\n            <Clock class=\"size-3\" aria-hidden=\"true\" />\n            Before you go\n          </Badge>\n          <DialogTitle class=\"mt-3 text-xl leading-snug text-balance\"> Take 30 days instead of 14 </DialogTitle>\n          <DialogDescription class=\"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 class=\"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 class=\"sm:justify-start\">\n          <Button>\n            Start the 30-day trial\n            <ArrowRight class=\"ml-2 size-4\" aria-hidden=\"true\" />\n          </Button>\n          <Button variant=\"ghost\" @click=\"open = false\">No thanks</Button>\n        </DialogFooter>\n      </DialogContent>\n    </Dialog>\n  </div>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/ExitIntentOffer.vue"
    }
  ],
  "dependencies": [
    "lucide-vue-next"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/dialog.json",
    "https://uipkge.dev/r/vue/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"
}