import CoUxTreeList from '../../../../components/10x/ux/ux-tree-list.js'
import EuiBasePage from '../eui-base.po.js'

export default class TreeListItemPage extends EuiBasePage {

  constructor() {
      super();
  }

  /**
   * Returns the index-nth CoUxTreeList from the page
   * @param index - index of the component
   * @returns CoUxTreeList
   */
  treeListByIndex(index) {
    let treeList1 =  new CoUxTreeList(this.mainContent);
    return treeList1.byIndex(index);
  }

  /**
   * Returns the CoUxTreeList from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxTreeList
   */
  treeListByTextContains(text) {
    let treeList1 = new CoUxTreeList(this.mainContent);
    return treeList1.byTextContains(text);
  }

  /**
   * Returns the CoUxTreeList from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxTreeList
   */
  treeListByTextEqualsAndIndex(text, index, normalize=true) {
    let treeList1 = new CoUxTreeList(this.mainContent);
    return treeList1.byTextEqualsAndIndex(text, index, normalize);
  }

   /**
   * Returns the CoUxTreeList from the page that contains the section
   * @param id - id to be contained
   * @returns CoUxTreeList
   */
    treeListFromSectionById(id) {
      return new CoUxTreeList(this.sectionById(id));
    }
    /**
     * Returns the CoUxTreeList from the page that contains the section and index
     * @param id - id to be contained
     * @param index - index of the component
     * @returns CoUxTreeList
     */
    treeListFromSectionWithIdByIndex(id, index) {
      const treeList1 = new CoUxTreeList(this.sectionById(id));
      return treeList1.byIndex(index);
    }

}


