import EuiBasePage from '../eui-base.po.js'
import CoUxAlert from '../../../../components/10x/ux/ux-alert.js'

export default class AlertPage extends EuiBasePage {
  constructor() {
      super();
  }
  alertByIndex(index) {
    let alert =  new CoUxAlert(this.mainContent);
    return alert.byIndex(index);
  }
  get alertCo() {
    return new CoUxAlert(this.mainContent);
  }
  alertByTextContains(text) {
    let alert = new CoUxAlert(this.mainContent);
    return alert.byTextContains(text);
  }
  alertByTextEqualsAndIndex(text, index, normalize=true) {
    let alert = new CoUxAlert(this.mainContent);
    return alert.byTextEqualsAndIndex(text, index, normalize);
  }
   alertFromSectionWithId(sectionId) {
      return new CoUxAlert(this.sectionById(sectionId));
   }
  alertFromSectionWithIdByIndex(sectionId, index) {
    let alert = new CoUxAlert(this.sectionById(sectionId));
    return alert.byIndex(index);
  }
}


