import{r as e}from"./rolldown-runtime-hePW80VL.js";import{o as t}from"./vendor-forms-yQg41KHz.js";import{t as n}from"./vendor-react-CAGJwf-T.js";import{t as r}from"./utils-Dk_44zMo.js";var i=e(t(),1),a=n(),o={top:`bottom-full left-1/2 -translate-x-1/2 mb-2`,bottom:`top-full left-1/2 -translate-x-1/2 mt-2`,left:`right-full top-1/2 -translate-y-1/2 mr-2`,right:`left-full top-1/2 -translate-y-1/2 ml-2`};function s({content:e,children:t,position:n=`top`,className:s}){let[c,l]=(0,i.useState)(!1),u=(0,i.useRef)(void 0),d=()=>{clearTimeout(u.current),u.current=setTimeout(()=>l(!0),200)},f=()=>{clearTimeout(u.current),l(!1)};return(0,a.jsxs)(`div`,{className:r(`relative inline-flex`,s),onMouseEnter:d,onMouseLeave:f,onFocus:d,onBlur:f,children:[t,c&&(0,a.jsx)(`div`,{className:r(`absolute z-50 px-2.5 py-1.5 text-xs font-medium text-white bg-slate-800 rounded-md whitespace-nowrap`,`pointer-events-none animate-in fade-in duration-150`,o[n]),role:`tooltip`,children:e})]})}export{s as t};