import{r as o,h as t,g as e,H as a}from"./p-4afc0173.js";import{d as i,t as r}from"./p-c5b591fd.js";import{c as l}from"./p-68a5aaff.js";const s={placement:"auto",modifiers:[{name:"offset",options:{offset:[0,4]}}]},p=["mouseenter"],n=["mouseleave","blur"],d=class{constructor(t){o(this,t),this.content=void 0,this.align="top"}componentDidLoad(){this.tooltip=i(),p.forEach((o=>{this.el.addEventListener(o,this.showHandler.bind(this))})),n.forEach((o=>{this.el.addEventListener(o,this.hideHandler.bind(this))}))}disconectedCallback(){p.forEach((o=>{this.el.removeEventListener(o,this.showHandler)})),n.forEach((o=>{this.el.removeEventListener(o,this.hideHandler)})),this.popper&&this.popper.destroy()}showHandler(){this.tooltip.setAttribute("data-show",""),this.tooltip.querySelector("span").innerHTML=r(this.content)||"",this.popper=l(this.el,this.tooltip,Object.assign(Object.assign({},s),{placement:this.align}))}hideHandler(){this.tooltip.removeAttribute("data-show"),this.tooltip.querySelector("span").innerHTML="",this.popper.destroy(),this.popper=null}render(){return t(a,{key:"669f42576ddaef625a326a978032007cd7aa8ade","aria-label":this.content})}get el(){return e(this)}};d.style='x-tooltip{display:inherit}x-tooltip-overlay{font-family:"TT Norms Pro", "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";background:var(--color-dark-tinted, #626262);color:var(--color-text-light, #FEFEFE);padding:4px 8px;font-size:0.9rem;border-radius:4px;display:none;-webkit-box-shadow:0 0 1em rgba(0, 0, 0, 0.2);box-shadow:0 0 1em rgba(0, 0, 0, 0.2);z-index:10000;position:relative;text-align:inherit}x-tooltip-overlay:empty{display:none}.is-dark-mode x-tooltip-overlay{background:var(--color-light-shade, #d8d8d8);color:var(--color-text, #4A4A4A)}x-tooltip-overlay[data-show]{display:block;-webkit-animation:0.4s fadeIn;animation:0.4s fadeIn}x-tooltip-overlay>p{margin:0px;font-family:"TT Norms Pro", "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}x-tooltip-overlay .tooltip-arrow,x-tooltip-overlay .tooltip-arrow::before{position:absolute;width:8px;height:8px;z-index:-1}x-tooltip-overlay .tooltip-arrow::before{content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--color-dark-tinted, #626262)}.is-dark-mode x-tooltip-overlay .tooltip-arrow::before{background:var(--color-light-shade, #d8d8d8)}x-tooltip-overlay[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}x-tooltip-overlay[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}x-tooltip-overlay[data-popper-placement^=left]>.tooltip-arrow{right:-4px}x-tooltip-overlay[data-popper-placement^=right]>.tooltip-arrow{left:-4px}';export{d as x_tooltip}