1function restaurantTabs() { 2 const tabLists = document.querySelectorAll("ul[data-tab-group]"); 3 tabLists.forEach((tabList) => { 4 const tabs = tabList.querySelectorAll("li"); 5 const container = tabList.closest("div"); 6 const carousels = (container == null ? void 0 : container.querySelectorAll(".swiper-andromeda")) || []; 7 const moduleElement = tabList.closest(".restaurants-apus"); 8 const descriptionBlocks = (moduleElement == null ? void 0 : moduleElement.querySelectorAll("[data-description-for]")) || []; 9 tabs.forEach((tab, index) => { 10 tab.addEventListener("click", () => { 11 tabs.forEach((t) => t.classList.remove("restaurants-apus__item-tab--active")); 12 tab.classList.add("restaurants-apus__item-tab--active"); 13 const descriptionTarget = tab.getAttribute("data-restaurant-target"); 14 descriptionBlocks.forEach((block) => { 15 block.classList.add("restaurant-description__dinamic-info--hidden"); 16 }); 17 if (descriptionTarget) { 18 const activeDescription = moduleElement == null ? void 0 : moduleElement.querySelector(`#${descriptionTarget}`); 19 if (activeDescription) { 20 activeDescription.classList.remove("restaurant-description__dinamic-info--hidden"); 21 } 22 } 23 carousels.forEach((carousel) => carousel.classList.remove("swiper-andromeda--active")); 24 if (carousels[index]) { 25 carousels[index].classList.add("swiper-andromeda--active"); 26 } 27 const socialContainers = (container == null ? void 0 : container.querySelectorAll("[data-social-for]")) || []; 28 socialContainers.forEach((el) => el.classList.add("restaurant-description__social--hidden")); 29 const activeSocial = container == null ? void 0 : container.querySelector(`[data-social-for="${index + 1}"]`); 30 if (activeSocial) { 31 activeSocial.classList.remove("restaurant-description__social--hidden"); 32 } 33 }); 34 }); 35 }); 36} 37export { 38 restaurantTabs as r 39}; 40//# sourceMappingURL=chunk-restaurant_tabs-D2cPMcNz.js.map
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.