__getNextNotDisabledTab(tabs, currentTab, dir) {
    let orderedNotDisabledTabs = /** @type {HTMLButtonElement[]} */ ([]);
    const nextNotDisabledTabs = tabs.filter((tab, i) => !tab.disabled && i > this.selectedIndex);
    const prevNotDisabledTabs = tabs.filter((tab, i) => !tab.disabled && i < this.selectedIndex);
    if (dir === 'right') {
      orderedNotDisabledTabs = [...nextNotDisabledTabs, ...prevNotDisabledTabs];
    } else {
      orderedNotDisabledTabs = [...prevNotDisabledTabs.reverse(), ...nextNotDisabledTabs.reverse()];
    }
    return orderedNotDisabledTabs[0];
  }
@param {HTMLButtonElement[]} tabs
@param {HTMLButtonElement} currentTab
@param {'right' | 'left'} dir
@returns {HTMLButtonElement|undefined}
@private