import{p as e,H as t,c as i,h as s,d as o,t as n}from"./p-yZBlG3YQ.js";const a=()=>`#verdocs-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}`;const d=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.close=i(this,"close");this.moved=false;this.overlayId=`verdocs-menu-panel-overlay`;this.panelId=`verdocs-menu-panel`;this.side="right";this.overlay=true;this.width=300}handleClick(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}}componentWillLoad(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top=`0px`;this.portal.style.bottom=`0px`;this.portal.style.width=`${this.width}px`;if(this.side==="left"){this.portal.style.left=`0px`}else{this.portal.style.right=`0px`}document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element)}disconnectedCallback(){this.moved?this.portal.remove():this.moved=true}hide(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()}render(){return s(o,{key:"1fa35d0ed0bedab19924d8a0f1ee11c36ea518e3",ref:e=>this.element=e},s("slot",{key:"280b09045cb04c9c2e595ab8a71536a18c746418"}))}static get style(){return a()}},[260,"verdocs-menu-panel",{side:[1],overlay:[4],width:[2]},[[4,"click","handleClick"]]]);function c(){if(typeof customElements==="undefined"){return}const e=["verdocs-menu-panel"];e.forEach((e=>{switch(e){case"verdocs-menu-panel":if(!customElements.get(n(e))){customElements.define(n(e),d)}break}}))}export{d as V,c as d};
//# sourceMappingURL=p-BhtYCb5T.js.map