/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./Tooltip2.css');require('./Tooltip.css');const e=require("vue");/* empty css               */;/* empty css              */const t=require("../../_virtual/_plugin-vue_export-helper.js"),o={__name:"Tooltip",props:{content:{type:String,default:""},placement:{type:String,default:"top"},offset:{type:Number,default:8},bg:{type:String,default:""}},setup(t){const o=t,l=e.ref(!1),n=e.ref(null),r=e.ref(null),i=e.ref({});function p(){l.value=!0,e.nextTick(a)}function u(){l.value=!1}function a(){const e=n.value,t=r.value;if(!e||!t)return;const l=e.getBoundingClientRect(),p=t.getBoundingClientRect(),u=o.offset,a={top:{left:l.width/2-p.width/2+"px",bottom:`${l.height+u}px`},bottom:{left:l.width/2-p.width/2+"px",top:`${l.height+u}px`},left:{right:`${l.width+u}px`,top:l.height/2-p.height/2+"px"},right:{left:`${l.width+u}px`,top:l.height/2-p.height/2+"px"}},c=a[o.placement]||a.top;o.bg&&(c.backgroundColor=o.bg,t.style.setProperty("--gsc-tooltip-bg",o.bg)),i.value=c}return e.watch(()=>[o.placement,o.offset,o.content,o.bg],()=>{l.value&&e.nextTick(a)}),e.watch(l,t=>{t&&e.nextTick(a)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n,class:"gsc-tooltip-wrapper",onMouseenter:p,onMouseleave:u,onFocusin:p,onFocusout:u},[e.renderSlot(o.$slots,"default",{},void 0,!0),e.createVNode(e.Transition,{name:"gsc-tooltip-fade"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltip",ref:r,class:e.normalizeClass(["gsc-tooltip",t.placement]),style:e.normalizeStyle(i.value),role:"tooltip"},[e.renderSlot(o.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)],6)):e.createCommentVNode("",!0)]),_:3})],544))}},l=t.default(o,[["__scopeId","data-v-4529db20"]]);exports.default=l;