Liferay.Loader.define("segments-web@3.0.77/js/ExperienceSelector",["module","exports","require"],(function(e,t,a){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default({namespace:e}){const t=document.getElementById("".concat(e,"dropdown")),a=document.getElementById("".concat(e,"dropdownToggle"));let n=null,i=null;const handleClick=()=>{"false"===a.getAttribute("aria-expanded")?(t.classList.add("show"),a.setAttribute("aria-expanded","true")):(t.classList.remove("show"),a.setAttribute("aria-expanded","false"))},handleDisable=e=>{t.classList.remove("show"),a.classList[e?"add":"remove"]("disabled"),a.setAttribute("aria-expanded","false")};t&&a&&(n=Liferay.on("SimulationMenu:closeSimulationPanel",(()=>handleDisable(!1))),a.addEventListener("click",handleClick),i=Liferay.on("SimulationMenu:openSimulationPanel",(()=>handleDisable(!0))));return{dispose(){a&&(n.detach(),a.removeEventListener("click",handleClick),i.detach())}}}}));
//# sourceMappingURL=ExperienceSelector.js.map