import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{$ as t}from"./vendor-charts-iXlq6Rne.js";import{_ as n}from"./vendor-flow-IzlrcDx6.js";import{rn as r}from"./index-HkVQGc9M.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};