import{r as t,h as e,H as o,c as a}from"./p-BIRwgFLv.js";import{c as s}from"./p-BfP9ezJQ.js";const n='verdocs-button-panel{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:inline-block}verdocs-button-panel .icon{display:inline-block;cursor:pointer;opacity:0.6}verdocs-button-panel .icon svg{fill:#707ae5}verdocs-button-panel .icon:hover{opacity:1}.verdocs-button-panel-content{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;display:none;background:#ffffff;color:#33364b;width:320px;font-weight:bold;padding:15px;font-size:14px;position:relative;border-radius:4px;z-index:10000}.verdocs-button-panel-content .arrow,.verdocs-button-panel-content .arrow::before{position:absolute;width:8px;height:8px;background:inherit}.verdocs-button-panel-content .arrow{visibility:hidden;top:-4px}.verdocs-button-panel-content .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.verdocs-button-panel-content[data-show]{display:block}.verdocs-button-panel-content[data-popper-placement^=top]>.arrow{bottom:-4px}.verdocs-button-panel-content[data-popper-placement^=bottom]>.arrow{top:-4px}.verdocs-button-panel-content[data-popper-placement^=left]>.arrow{right:-4px}.verdocs-button-panel-content[data-popper-placement^=right]>.arrow{left:-4px}.verdocs-button-panel-content h6{font-size:16px;font-weight:bold;margin:0 0 16px 0;color:#092c4c;border-bottom:1px solid #cccccc}';const i=class{constructor(e){t(this,e);this.icon="";this.showing=false}componentDidRender(){document.body.appendChild(this.panelEl);if(this.popperInstance){this.popperInstance.destroy()}this.popperInstance=s(this.iconEl,this.panelEl,{})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}if(this.panelEl){this.panelEl.remove()}}async showPanel(){var t,e;(t=this.panelEl)===null||t===void 0?void 0:t.setAttribute("data-show","");(e=this.popperInstance)===null||e===void 0?void 0:e.update().catch((()=>{}));this.showing=true;this.hiderEl=document.createElement("div");this.hiderEl.id="verdocs-button-panel-hider";this.hiderEl.style.zIndex="100";this.hiderEl.style.position="absolute";this.hiderEl.style.top="0px";this.hiderEl.style.left="0px";this.hiderEl.style.right="0px";this.hiderEl.style.bottom="0px";this.hiderEl.onclick=t=>{t.stopPropagation();this.toggle()};document.body.appendChild(this.hiderEl)}async hidePanel(){var t;Array.from(document.getElementsByClassName("verdocs-button-panel-content")).forEach((t=>{t.removeAttribute("data-show")}));(t=document.getElementById("verdocs-button-panel-hider"))===null||t===void 0?void 0:t.remove();this.showing=false}async toggle(){if(this.showing){await this.hidePanel()}else{await this.showPanel()}}render(){return e(o,{key:"c4a19a142c4e228213a78988847a66b9d952ee27"},e("div",{key:"d01b744c644e6ae143aa8654c25a15780189cd98",class:"icon",innerHTML:this.icon,onClick:t=>{t.stopPropagation();return this.toggle()},ref:t=>this.iconEl=t}),e("div",{key:"5bc6a60df0c2e15b7fa4da356130618c540e2ec7",role:"tooltip",class:"verdocs-button-panel-content","data-popper-placement":"bottom",ref:t=>this.panelEl=t},e("div",{key:"024f7c9713c9c57dc04d9cceaa93c7a40cb8eaba","data-popper-arrow":"true",class:"arrow"}),e("slot",{key:"544361c54c163063f4013cc52ea4a12c6baff24b"})))}};i.style=n;const r='verdocs-tabs{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-tabs .tab{display:-ms-flexbox;display:flex;color:#111111;cursor:pointer;font-size:14px;font-weight:400;padding:5px 10px;-ms-flex-align:center;align-items:center;text-transform:none;-ms-flex-pack:center;justify-content:center;border-bottom:4px solid transparent}verdocs-tabs .tab:focus{border:none;outline:none}verdocs-tabs .tab.active{color:#000000;font-weight:500;border-bottom:4px solid #654dcb}verdocs-tabs .tab.disabled{color:#aaaaaa;cursor:default}';const c=class{constructor(e){t(this,e);this.selectTab=a(this,"selectTab");this.tabs=[];this.selectedTab=0}handleSelectTab(t){var e;(e=this.selectTab)===null||e===void 0?void 0:e.emit({tab:this.tabs[t],index:t})}render(){return e(o,{key:"6de4c126c0d4efe31e925569090af9dd032fae0c"},this.tabs.map(((t,o)=>e("div",{class:`tab ${o===this.selectedTab?"active":""} ${t.disabled?"disabled":""}`,onClick:t.disabled?()=>{}:()=>this.handleSelectTab(o)},t.label))),e("div",{key:"a3aba39b6b1a758ea4ed7a87860108bbe9367565",class:"flex flex-1"}),e("slot",{key:"0bda7a4123dcab3d4aef3e65cadad14bcdba6312"},e("div",{key:"7033a1cb8eefd67ae7c621bcd6a5c3b348d1b3fe"})))}};c.style=r;export{i as verdocs_button_panel,c as verdocs_tabs};
//# sourceMappingURL=p-a5a81159.entry.js.map