function selectTab(tabComponent, tabIndex) {
  const tabTitles = tabComponent.querySelectorAll('.rev-TabsTitle')
  const tabPanels = tabComponent.querySelectorAll('.rev-TabsItem-panel')

  for (let i = 0; i < tabTitles.length; i++) {
    const tabTitle = tabTitles[i]
    const tabPanel = tabPanels[i]

    if (tabIndex === i) {
      tabTitle.classList.add('rev-TabsTitle--selected')
      tabPanel.classList.add('rev-TabsItem-panel--selected')
    } else {
      tabTitle.classList.remove('rev-TabsTitle--selected')
      tabPanel.classList.remove('rev-TabsItem-panel--selected')
    }
  }
}
/**
 * Makes the given tab the active one
 * @param {HTMLElement} tabComponent The Tab component
 * @param {number} tabIndex The index of the tab to select
 * @returns {void}
 */
Makes the given tab the active one
@param {HTMLElement} tabComponent The Tab component
@param {number} tabIndex The index of the tab to select
@returns {void}
Makes the given tab the active one @param { HTMLElement } tabComponent The Tab component @param { number } tabIndex The index of the tab to select @returns { void }
function selectTab(tabComponent, tabIndex) {
  const tabTitles = tabComponent.querySelectorAll('.rev-TabsTitle')
  const tabPanels = tabComponent.querySelectorAll('.rev-TabsItem-panel')
  for (let i = 0; i < tabTitles.length; i++) {
    const tabTitle = tabTitles[i]
    const tabPanel = tabPanels[i]
    if (tabIndex === i) {
      tabTitle.classList.add('rev-TabsTitle--selected')
      tabPanel.classList.add('rev-TabsItem-panel--selected')
    } else {
      tabTitle.classList.remove('rev-TabsTitle--selected')
      tabPanel.classList.remove('rev-TabsItem-panel--selected')
    }
  }
}
function selectTab ( tabComponent , tabIndex ) { const tabTitles = tabComponent . querySelectorAll ( '.rev-TabsTitle' ) const tabPanels = tabComponent . querySelectorAll ( '.rev-TabsItem-panel' ) for ( let i = 0 ; i < tabTitles . length ; i ++ ) { const tabTitle = tabTitles [ i ] const tabPanel = tabPanels [ i ] if ( tabIndex === i ) { tabTitle . classList . add ( 'rev-TabsTitle--selected' ) tabPanel . classList . add ( 'rev-TabsItem-panel--selected' ) } else { tabTitle . classList . remove ( 'rev-TabsTitle--selected' ) tabPanel . classList . remove ( 'rev-TabsItem-panel--selected' ) } } }
Makes the given tab the active one
 @param {HTMLElement} tabComponent The Tab component
 @param {number} tabIndex The index of the tab to select
 @returns {void}
Makes the given tab the active one @param { HTMLElement } tabComponent The Tab component @param { number } tabIndex The index of the tab to select @returns { void }