"use client"
import{b as c}from"./chunk-OANI55ZO.mjs";import{b as p,i as m}from"./chunk-EOVN2AF5.mjs";import*as n from"@radix-ui/react-tooltip";import d from"linkify-react";import{HelpCircle as x}from"lucide-react";import u from"next/link";import{useState as f}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function P({children:e}){return t(n.Provider,{delayDuration:100,children:e})}function s({children:e,content:o,side:r="top"}){let[i,l]=f(!1);return a(n.Root,{open:i,onOpenChange:l,children:[t(n.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),t(n.Portal,{children:t(n.Content,{sideOffset:8,side:r,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",children:typeof o=="string"?t("span",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:o}):o})})]})}function k({title:e,cta:o,href:r,target:i,onClick:l}){return a("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[t("p",{className:"text-sm text-gray-700",children:e}),o&&(r?t(u,{href:r,...i?{target:i}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:o}):l?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:l,children:o}):null)]})}function w({title:e,cta:o,href:r}){return a("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[e," ",t("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:i=>i.stopPropagation(),className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:o})]})}function C({children:e}){return t("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-gray-700",children:t(d,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-gray-400 hover:text-gray-700"},children:e})})}function R(e){return t(s,{...e,children:t(x,{className:"h-4 w-4 text-gray-500"})})}function B({value:e,unit:o="total clicks",children:r,lastClicked:i}){return(!e||e<1e3)&&!i?r:t(s,{content:a("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[a("p",{className:"text-sm font-semibold text-gray-700",children:[p(e||0,{full:!0})," ",o]}),i&&a("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",m(i,{withAgo:!0})]})]}),children:r})}function L({children:e,content:o,...r}){return t(s,{content:o,...r,children:t("div",{className:"flex cursor-pointer items-center",children:t(c,{variant:"gray",className:"border-gray-300 transition-all hover:bg-gray-200",children:e})})})}function O({tooltipContent:e,children:o,...r}){return t(s,{content:e,children:t("div",{className:"flex cursor-pointer items-center",children:t("button",{type:"button",...r,children:o})})})}export{P as a,s as b,k as c,w as d,C as e,R as f,B as g,L as h,O as i};
