import k from"./Kbd.281578d0.js";import{g as N,E as $,G as h,j as f,H as c,r as w,o as a,c as n,I as v,d as l,y as u,b as B,w as y,a as T,t as g,F as D,x as L,k as O,l as b,L as V,T as j}from"./entry.eb978f24.js";import{u as S}from"./usePopper.e41ed176.js";import{_ as z}from"./_plugin-vue_export-helper.c27b6911.js";import"./index.83f60940.js";import"./index.d18b209b.js";import"./_baseIteratee.3ae3c3e2.js";import"./_baseIsEqual.8f3c5dea.js";import"./_MapCache.e1952f2e.js";import"./get.96cc1b46.js";import"./_baseGet.b8f437ea.js";import"./_baseAssignValue.46c694f0.js";import"./_getAllKeysIn.acace03e.js";const A=N({components:{UKbd:k},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:()=>$.ui.tooltip}},setup(e){const r=h(),i=f(()=>c({},e.ui,r.ui.tooltip)),p=f(()=>c({},e.popper,i.value.popper)),[m,d]=S(p.value),t=w(!1);let o=null,s=null;function M(){s&&(clearTimeout(s),s=null),!t.value&&(o=o||setTimeout(()=>{t.value=!0,o=null},e.openDelay))}function C(){o&&(clearTimeout(o),o=null),t.value&&(s=s||setTimeout(()=>{t.value=!1,s=null},e.closeDelay))}return{ui:i,trigger:m,container:d,open:t,onMouseOver:M,onMouseLeave:C}}}),E=T("span",{class:"mx-1 text-gray-700 dark:text-gray-200"},"·",-1);function F(e,r,i,p,m,d){const t=k;return a(),n("div",{ref:"trigger",class:u(e.ui.wrapper),onMouseover:r[0]||(r[0]=(...o)=>e.onMouseOver&&e.onMouseOver(...o)),onMouseleave:r[1]||(r[1]=(...o)=>e.onMouseLeave&&e.onMouseLeave(...o))},[v(e.$slots,"default",{open:e.open},()=>[l(" Hover ")]),e.open&&!e.prevent?(a(),n("div",{key:0,ref:"container",class:u([e.ui.container,e.ui.width])},[B(j,V({appear:""},e.ui.transition),{default:y(()=>[T("div",{class:u([e.ui.base,e.ui.background,e.ui.color,e.ui.rounded,e.ui.shadow,e.ui.ring])},[v(e.$slots,"text",{},()=>[l(g(e.text),1)]),e.shortcuts?.length?(a(),n("span",{key:0,class:u(e.ui.shortcuts)},[E,(a(!0),n(D,null,L(e.shortcuts,o=>(a(),O(t,{key:o,size:"xs"},{default:y(()=>[l(g(o),1)]),_:2},1024))),128))],2)):b("",!0)],2)]),_:3},16)],2)):b("",!0)],34)}const Z=z(A,[["render",F]]);export{Z as default};
