import{p as o,H as t,h as e,d as i,t as r}from"./p-yZBlG3YQ.js";import{c as a}from"./p-BfP9ezJQ.js";const s=()=>`verdocs-toolbar-icon{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}`;const c=o(class o extends t{constructor(o){super();if(o!==false){this.__registerHost()}this.text="";this.icon="";this.placement="bottom";this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=a(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}show(){var o,t;(o=this.tooltip)===null||o===void 0?void 0:o.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((()=>{}))}hide(){var o;(o=this.tooltip)===null||o===void 0?void 0:o.removeAttribute("data-show")}render(){return e(i,{key:"64a2e66b73bc714068abbc7024f4446444525b51",class:{}},e("div",{key:"8271ad6342aa1000d9b639c34a07f050cf223782","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),e("div",{key:"1612f539226e949d28b2a44e6bec1d737e486efb",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,e("div",{key:"9a34206611c0f3cec8b0641ab78e0c9199a2dd42","data-popper-arrow":"true",class:"arrow"})))}static get style(){return s()}},[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]);function n(){if(typeof customElements==="undefined"){return}const o=["verdocs-toolbar-icon"];o.forEach((o=>{switch(o){case"verdocs-toolbar-icon":if(!customElements.get(r(o))){customElements.define(r(o),c)}break}}))}export{c as V,n as d};
//# sourceMappingURL=p-Bxmki12o.js.map