function n(){document.querySelectorAll("[data-row-menu-toggle]").forEach(e=>{e.addEventListener("click",t=>{t.stopPropagation();const a=e.closest("[data-row-menu]")?.querySelector("[data-row-menu-panel]");a&&(document.querySelectorAll("[data-row-menu-panel]").forEach(d=>{d!==a&&d.classList.add("hidden")}),a.classList.toggle("hidden"))})}),document.addEventListener("click",()=>{document.querySelectorAll("[data-row-menu-panel]").forEach(e=>e.classList.add("hidden"))}),document.addEventListener("keydown",e=>{e.key==="Escape"&&document.querySelectorAll("[data-row-menu-panel]").forEach(t=>t.classList.add("hidden"))})}export{n as default};
