import CoUxLayoutPage from '../../../../components/10x/ux/ux-layout-page.js';
import EuiBasePage from '../eui-base.po.js';

export default class LayoutPage extends EuiBasePage {

  constructor() {
      super();
  }

  /**
   * Returns the index-nth CoUxLayoutPage from the page
   * @param index - index of the component
   * @returns CoUxLayoutPage
   */
  layoutPageByIndex(index) {
    const layoutPage1 =  new CoUxLayoutPage(this.mainContent);
    return layoutPage1.byIndex(index);
  }
 /**
   * Returns the CoUxLayoutPage from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxLayoutPage
   */
  layoutPageByTextContains(text) {
    let layoutPage1 = new CoUxLayoutPage(this.mainContent);
    return layoutPage1.byTextContains(text);
  }

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


