import CoEuiAlert from '../../../components/14x/eui-alert.js'
import EuiBasePage from './eui-base.po.js'

export default class EuiAlertPage extends EuiBasePage {

  constructor() {
      super();
  }

  alertByIndex(index) {
    return  new CoEuiAlert(this.mainContent).byIndex(index);
  }

  alertByTextContains(text) {
    return  new CoEuiAlert(this.mainContent).byTextContains(text);
  }

  alertByTextEqualsAndIndex(text, index, normalize=true) {
    return new CoEuiAlert(this.mainContent).byTextEqualsAndIndex(text, index, normalize);
  }

  alertFromSectionWithId(sectionId) {
      return new CoEuiAlert(this.sectionById(sectionId));
   }

  alertFromSectionWithIdByIndex(sectionId, index) {
    let alert = new CoEuiAlert(this.sectionById(sectionId));
    return alert.byIndex(index);
  }
}
