import{r as t,c as o,h as i,H as s,a as e}from"./p-7d0be017.js";const p=class{constructor(i){t(this,i),this.gascoTooltip=o(this,"gascoTooltip",7),this.visible=!0,this.position="top",this.tappable=!0,this.stopPropagation=!0}onMouseDown(t){this.emitTap(t)}emitTap(t){this.stopPropagation&&(t.preventDefault(),t.stopPropagation()),this.tappable&&this.gascoTooltip.emit()}componentDidLoad(){setTimeout((()=>{const t=this.tooltipRef.offsetHeight,o=this.tooltipSlotRef.offsetHeight;this.tooltipRef.style.transform="top"===this.position?`translateY(-${Math.ceil(2*t/2)+o}px)`:`translateY(${Math.ceil(2*t/1.9)+o}px)`}),1e3)}render(){return i(s,{tabindex:"-1","aria-hidden":"true",class:{"tooltip-hide":!this.visible,"tooltip-no-tappable":!this.tappable,"gasco-tooltip":!0}},i("div",{ref:t=>this.tooltipRef=t,class:{"tooltip-show":!0,[`tooltip-${this.position}`]:!0}},this.label),i("div",{style:{display:"inline"},ref:t=>this.tooltipSlotRef=t},i("slot",null)))}get el(){return e(this)}};p.style=':host{position:relative;cursor:default}:host .tooltip-show{position:absolute;left:0;z-index:99999;background:#999999;border-radius:4px;visibility:hidden;max-width:274px;width:max-content;word-wrap:break-word;padding:4px 12px;display:flex;align-items:center;color:#FFFFFF;font-weight:400;font-size:18px;line-height:28px;filter:drop-shadow(0px 4px 8px rgba(171, 190, 209, 0.4));transition:ease-in 200ms all}:host .tooltip-show:before{background-color:#999999;border-radius:1px;bottom:-3px;content:"";height:8px;width:8px;left:10px;position:absolute;-webkit-transform:rotate(45deg);transform:rotate(45deg)}:host .tooltip-show.tooltip-top{top:calc(100% - 75px);opacity:0;top:-20px}:host .tooltip-show.tooltip-bottom{opacity:0;bottom:calc(100% - 75px);bottom:-20px}:host .tooltip-show.tooltip-bottom:before{top:-3px;bottom:inherit;content:"";position:absolute}@media (any-hover: hover){:host(:hover) .tooltip-show.tooltip-top,:host(:hover) .tooltip-show.tooltip-bottom{opacity:1;top:0;visibility:visible}:host(:hover) .tooltip-show.tooltip-bottom{top:initial;bottom:0}}@media only screen and (max-width: 768px){:host .tooltip-show{font-size:16px;line-height:24px}}@media only screen and (max-width: 480px){:host .tooltip-show{font-size:14px;line-height:20px}}';export{p as gasco_tooltip}