import CoUxListItem from '../../../../components/10x/ux/ux-list-item.js';
import CoUxListItems from '../../../../components/10x/ux/ux-list-items.js';
import EuiBasePage from '../eui-base.po.js';

export default class ListItemPage extends EuiBasePage {
  constructor() {
      super();
  }
  listItemByIndex(index) {
    let listItem1 =  new CoUxListItems(this.mainContent).listItemCO;
    return listItem1.byIndex(index);
  }
  listItemsByIndex(index) {
    let listItem1 =  new CoUxListItems(this.mainContent);
    return listItem1.byIndex(index);
  }
  listItemByTextContains(text) {
    let listItem1 = new CoUxListItems(this.mainContent).listItemCO;
    return listItem1.byTextContains(text);
  }
  listItemsByTextContains(text) {
    let listItem1 = new CoUxListItems(this.mainContent);
    return listItem1.byTextContains(text);
  }
  listItemByTextEqualsAndIndex(text, index, normalize=true) {
    let listItem1 = new CoUxListItems(this.mainContent).listItemCO;
    return listItem1.byTextEqualsAndIndex(text, index, normalize);
  }
  listItemsByTextEqualsAndIndex(text, index, normalize=true) {
    let listItem1 = new CoUxListItems(this.mainContent);
    return listItem1.byTextEqualsAndIndex(text, index, normalize);
  }
  listItemFromSectionById(id) {
    return new CoUxListItem(this.sectionById(id));
  }
  sectionPartBySectionTitle(title) {
    let path = '//h6[@class="section-title" and contains(text(),"'+title+'")]';
    return this.mainContent + path;
  }
  listItemFromSectionWithIdByIndex(id, index) {
    let listItem1 = new CoUxListItem(this.sectionById(id));
    return listItem1.byIndex(index);
  }
}


