import k from"./Kbd.56cf2239.js";import{E as C,G as m,g as N,j as $,U as w,r as B,o as a,c as n,H as c,d as u,y as i,b as D,w as v,a as T,t as g,F as O,x as L,k as U,l as y,K as b,T as V}from"./entry.9e31e8a4.js";import{n as j,u as K}from"./ui.config.7ae255de.js";import{u as S}from"./usePopper.94795ccf.js";import{_ as z}from"./_plugin-vue_export-helper.c27b6911.js";import"./tw-merge.27ca352e.js";import"./index.dff89205.js";import"./index.87a09f8b.js";const A=C(m.ui.strategy,m.ui.tooltip,j),E=N({components:{UKbd:k},inheritAttrs:!1,props:{text:{type:String,default:null},prevent:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},popper:{type:Object,default:()=>({})},ui:{type:Object,default:void 0}},setup(e){const{ui:t,attrs:l}=K("tooltip",e.ui,A,{mergeWrapper:!0}),p=$(()=>w({},e.popper,t.value.popper)),[f,d]=S(p.value),r=B(!1);let o=null,s=null;function M(){s&&(clearTimeout(s),s=null),!r.value&&(o=o||setTimeout(()=>{r.value=!0,o=null},e.openDelay))}function h(){o&&(clearTimeout(o),o=null),r.value&&(s=s||setTimeout(()=>{r.value=!1,s=null},e.closeDelay))}return{ui:t,attrs:l,trigger:f,container:d,open:r,onMouseOver:M,onMouseLeave:h}}}),F=T("span",{class:"mx-1 text-gray-700 dark:text-gray-200"},"·",-1);function H(e,t,l,p,f,d){const r=k;return a(),n("div",b({ref:"trigger",class:e.ui.wrapper},e.attrs,{onMouseover:t[0]||(t[0]=(...o)=>e.onMouseOver&&e.onMouseOver(...o)),onMouseleave:t[1]||(t[1]=(...o)=>e.onMouseLeave&&e.onMouseLeave(...o))}),[c(e.$slots,"default",{open:e.open},()=>[u(" Hover ")]),e.open&&!e.prevent?(a(),n("div",{key:0,ref:"container",class:i([e.ui.container,e.ui.width])},[D(V,b({appear:""},e.ui.transition),{default:v(()=>[T("div",{class:i([e.ui.base,e.ui.background,e.ui.color,e.ui.rounded,e.ui.shadow,e.ui.ring])},[c(e.$slots,"text",{},()=>[u(g(e.text),1)]),e.shortcuts?.length?(a(),n("span",{key:0,class:i(e.ui.shortcuts)},[F,(a(!0),n(O,null,L(e.shortcuts,o=>(a(),U(r,{key:o,size:"xs"},{default:v(()=>[u(g(o),1)]),_:2},1024))),128))],2)):y("",!0)],2)]),_:3},16)],2)):y("",!0)],16)}const X=z(E,[["render",H]]);export{X as default};
