__getNextAvailableIndex(newIndex, direction) {
    const currentTab = this.tabs[this.selectedIndex];
    if (this.tabs.every(tab => !tab.disabled)) {
      return newIndex;
    }
    if (direction === 'ArrowRight' || direction === 'ArrowDown') {
      const nextNotDisabledTab = this.__getNextNotDisabledTab(this.tabs, currentTab, 'right');
      return this.tabs.findIndex(tab => nextNotDisabledTab === tab);
    }
    if (direction === 'ArrowLeft' || direction === 'ArrowUp') {
      const nextNotDisabledTab = this.__getNextNotDisabledTab(this.tabs, currentTab, 'left');
      return this.tabs.findIndex(tab => nextNotDisabledTab === tab);
    }
    if (direction === 'Home') {
      return this.tabs.findIndex(tab => !tab.disabled);
    }
    if (direction === 'End') {
      const notDisabledTabs = this.tabs
        .map((tab, i) => ({ disabled: tab.disabled, index: i }))
        .filter(tab => !tab.disabled);
      return notDisabledTabs[notDisabledTabs.length - 1].index;
    }
    return -1;
  }
@param {number} newIndex
@param {string} direction
@returns {number}
@private