const featshow_trigger_el=document.querySelectorAll("[featshow]");for(var i=0;i<featshow_trigger_el.length;i++)featshow_trigger_el[i].addEventListener("click",(function(){featshow(this.getAttribute("featshow"),this.getAttribute("featshow-item"))}));function featshow(id,item){const component=document.getElementById(id),items_nr=component.querySelectorAll(".featshow__item").length,arrow_prev=component.querySelector(".featshow__arrow--prev"),arrow_next=component.querySelector(".featshow__arrow--next");let current_item=parseInt(component.getAttribute("current-item"));if("next"==item){if(current_item==items_nr-1)return;item=current_item+1}else if("prev"==item){if(0==current_item)return;item=current_item-1}const nav_active=component.querySelector(".featshow__btn--active"),dot_active=component.querySelector(".featshow__dot--active"),item_active=component.querySelector(".featshow__item--active"),nav_target=component.querySelectorAll(".featshow__btn")[item],dot_target=component.querySelectorAll(".featshow__dot")[item],item_target=component.querySelectorAll(".featshow__item")[item];if(0==item?(arrow_prev.classList.remove("featshow__arrow--active"),arrow_next.classList.add("featshow__arrow--active")):item==items_nr-1?(arrow_prev.classList.add("featshow__arrow--active"),arrow_next.classList.remove("featshow__arrow--active")):(arrow_prev.classList.add("featshow__arrow--active"),arrow_next.classList.add("featshow__arrow--active")),nav_active.classList.remove("featshow__btn--active"),dot_active.classList.remove("featshow__dot--active"),item_active.classList.remove("featshow__item--active"),nav_target.classList.add("featshow__btn--active"),dot_target.classList.add("featshow__dot--active"),item_target.classList.add("featshow__item--active"),component.setAttribute("current-item",item),component.classList.add("featshow--active"),window.innerWidth<act.sm){const featshow_scroll=act.getOffsetTop(item_target)-act.scroll_offset.get();window.scroll({top:featshow_scroll,left:0,behavior:"smooth"})}}
//# sourceURL=https://cdn2.hubspot.net/hub/2588556/hub_generated/template_assets/56026036622/1727358263542/pwcded/js/components/features-showcase.js