import{au as B,cv as k,cn as O,cw as h,a3 as m,bi as r,O as l,c3 as v,bO as I,bI as T,bq as w,bB as x,X as z,cS as f,W as C,c0 as F,V as $}from"#entry";import{q as R,g,l as q}from"./7nzMR1a0.js";import{f as A}from"./D_qxKlPu.js";const N=T({id:String,interactive:Boolean,text:String,...w(q({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","retainFocus","captureFocus","disableInitialFocus"])},"VTooltip"),W=B()({name:"VTooltip",props:N(),emits:{"update:modelValue":t=>!0},setup(t,o){let{slots:e}=o;const a=k(t,"modelValue"),{scopeId:s}=R(),y=O(),c=v(()=>t.id||`v-tooltip-${y}`),u=I(),S=l(()=>t.location.split(" ").length>1?t.location:t.location+" center"),V=l(()=>t.origin==="auto"||t.origin==="overlap"||t.origin.split(" ").length>1||t.location.split(" ").length>1?t.origin:t.origin+" center"),b=v(()=>t.transition!=null?t.transition:a.value?"scale-transition":"fade-transition"),P=l(()=>r({"aria-describedby":c.value},t.activatorProps));return h(()=>{const p=g.filterProps(t);return m(g,r({ref:u,class:["v-tooltip",{"v-tooltip--interactive":t.interactive},t.class],style:t.style,id:c.value},p,{modelValue:a.value,"onUpdate:modelValue":i=>a.value=i,transition:b.value,absolute:!0,location:S.value,origin:V.value,role:"tooltip",activatorProps:P.value,_disableGlobalStack:!0},s),{activator:e.activator,default:function(){for(var i=arguments.length,d=new Array(i),n=0;n<i;n++)d[n]=arguments[n];return e.default?.(...d)??t.text}})}),A({},u)}}),M={__name:"TBtn",props:{tooltip:{type:String,default:""},color:{type:String,default:""},to:{type:String,default:""},icon:{type:String,default:""},density:{type:String,default:"comfortable"},size:{type:String,default:"large"},variant:{type:String,default:"plain"}},emits:["click"],setup(t){return(o,e)=>(x(),z(W,{location:"top"},{activator:f(({props:a})=>[m($,r(a,{color:t.color,icon:t.icon,variant:t.variant,size:t.size,density:t.density,to:t.to,onClick:e[0]||(e[0]=s=>o.$emit("click"))}),null,16,["color","icon","variant","size","density","to"])]),default:f(()=>[C("span",null,F(o.$t(t.tooltip)),1)]),_:1}))}};export{M as _};
