import CoUxTab from '../../../../components/10x/ux/ux-tab.js'
import CoUxTabs from '../../../../components/10x/ux/ux-tabs.js'
import EuiBasePage from '../eui-base.po.js'

export default class TabPage extends EuiBasePage {

  constructor() {
      super();
  }
  tabByIndex(index) {
    let tab =  new CoUxTabs(this.mainContent).tabCO;
    return tab.byIndex(index);
  }
  tabsByIndex(index) {
    let tab =  new CoUxTabs(this.mainContent);
    return tab.byIndex(index);
  }
  tabByTextContains(text) {
    let tab = new CoUxTabs(this.mainContent).tabCO;
    return tab.byTextContains(text);
  }
  tabsByTextContains(text) {
    let tab = new CoUxTabs(this.mainContent);
    return tab.byTextContains(text);
  }
  tabByTextEqualsAndIndex(text, index, normalize=true) {
    let tab = new CoUxTabs(this.mainContent).tabCO;
    return tab.byTextEqualsAndIndex(text, index, normalize);
  }
  tabsByTextEqualsAndIndex(text, index, normalize=true) {
    let tab = new CoUxTabs(this.mainContent);
    return tab.byTextEqualsAndIndex(text, index, normalize);
  }
  tabFromSectionById(id) {
    return new CoUxTab(this.sectionById(id));
  }
  tabsFromSectionById(id) {
    return new CoUxTabs(this.sectionById(id));
  }
  tabFromSectionWithIdByIndex(id, index) {
    let tab = new CoUxTabs(this.sectionById(id)).tabCO;
    return tab.byIndex(index);
  }
}


