import{r as t,h as e,F as s}from"./p-0d5a2e05.js";const i=class{constructor(e){t(this,e);this.anchorEl=null;this.open=false;this.onClose=()=>{};this.handleClickOutside=t=>{if(this.anchorEl&&!this.anchorEl.contains(t.target)){this.onClose()}}}componentDidLoad(){document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside)}getMenuStyle(){var t;const e=(t=this.anchorEl)===null||t===void 0?void 0:t.getBoundingClientRect();return{position:"absolute",top:`${(e===null||e===void 0?void 0:e.bottom)+window.scrollY}px`,left:`${(e===null||e===void 0?void 0:e.left)+window.scrollX}px`,zIndex:"1000"}}render(){return e(s,{key:"5e10a99bade5cd109be97e44b4a780737b248ce6"},this.open&&this.anchorEl&&e("ul",{key:"0b78ff517c4c128cfce96fa7eff5f53a606c2c77",class:"menu",style:this.getMenuStyle()},e("slot",{key:"177676d0a8d61e73873c2b513e79046a7cdaf24c"})))}};export{i as dga_menu};
//# sourceMappingURL=p-a032fc36.entry.js.map