1import{LitElement,html}from"@lit";class MobileMenuPanel extends LitElement{constructor(){super(),this.$container=this.querySelector(".mobile-menu__container"),this.parentItems=this.querySelectorAll(".js-mobile-parent-item"),this.subPanels=this.querySelectorAll(".mobile-menu__sub-panel"),this.closeSubpanelBtn=this.querySelector(".js-submenu-close-button"),this.$parentLinkTitle=this.querySelector(".js-parent-menu-title"),this._handleSubMenuOpen=this._handleSubMenuOpen.bind(this),this._handleSubMenuClose=this._handleSubMenuClose.bind(this)}connectedCallback(){super.connectedCallback();for(const item of this.parentItems)item.addEventListener("click",e=>{this._handleSubMenuOpen(e)});this.closeSubpanelBtn.addEventListener("click",this._handleSubMenuClose)}disconnectedCallback(){super.disconnectedCallback();for(const item of this.parentItems)item.removeEventListener("click",e=>{this._handleSubMenuOpen(e)});this.closeSubpanelBtn.removeEventListener("click",this._handleSubMenuClose)}_handleSubMenuOpen=e=>{e.preventDefault();const targetId=e.target?.getAttribute("data-target")||"",title=e.target?.getAttribute("data-title")||"";if(targetId)for(const item of this.subPanels)item.getAttribute("data-panel-id")===targetId?item.classList.remove("unvisible"):item.classList.add("unvisible");this.$parentLinkTitle.innerHTML=title,this.$container.classList.add("mobile-submenu__opened")};_handleSubMenuClose=()=>{this.$container.classList.remove("mobile-submenu__opened");for(const item of this.subPanels)item.classList.add("unvisible")};render(){return html` 2 <slot></slot> 3 `}}customElements.define("mobile-menu-panel",MobileMenuPanel); 4//# sourceMappingURL=/cdn/shop/t/334/assets/component-mobile-menu-panel.js.map?v=3725088703706651061790255855
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.