// табы
const tabsBtn = [...document.querySelectorAll(".widget-chat__tabs__btn")];
if (xDiff > 0) {
/* left swipe */
const currIdx = tabsBtn.findIndex((el) => el.classList.contains("active"));
const prevIdx = currIdx - 1;
if (prevIdx > -1) {
tabsBtn[prevIdx].click();
}
} else {
/* right swipe */
const currIdx = tabsBtn.findIndex((el) => el.classList.contains("active"));
const nextIdx = currIdx + 1;
if (nextIdx < tabsBtn.length) {
tabsBtn[nextIdx].click();
}
}