import{r as t,h as s,F as e}from"./p-D0dWnGvB.js";const i=class{constructor(s){t(this,s),this.anchorEl=null,this.open=!1,this.onClose=()=>{},this.handleClickOutside=t=>{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 s=null===(t=this.anchorEl)||void 0===t?void 0:t.getBoundingClientRect();return{position:"absolute",top:`${(null==s?void 0:s.bottom)+window.scrollY}px`,left:`${(null==s?void 0:s.left)+window.scrollX}px`,zIndex:"1000"}}render(){return s(e,{key:"cba56b25063d535cf3660806f3b80822330c0c06"},this.open&&this.anchorEl&&s("ul",{key:"1368cf622296d6f04bcaeb75058e278936e15ef4",class:"menu",style:this.getMenuStyle()},s("slot",{key:"56c1ff862b1ff0cac2a7a6bc08235342ed956a00"})))}};export{i as dga_menu}