import EuiBasePage from '../eui-base.po.js';
import CoEuiGrowl from '../../../../components/10x/eui/eui-growl.js';
import CoUxButton from '../../../../components/10x/ux/ux-button.js';

export default class GrowlPage extends EuiBasePage {
  constructor() {
      super();
  }
  growlByIndex(index) {
    let growl =  new CoEuiGrowl('//body');
    return growl.byIndex(index);
  }
  growlByTextContains(text) {
    let growl = new CoEuiGrowl('//body');
    return growl.byTextContains(text);
  }
  growlByTextEqualsAndIndex(text, index, normalize=true) {
    let growl = new CoEuiGrowl('//body');
    return growl.byTextEqualsAndIndex(text, index, normalize);
  }
  get allowMultipleGrowlsCheckbox() {
    return this.mainContent +  '//label[@for = "isGrowlMultiple"]';
  }
  buttonByTextContains(text) {
    let button = new CoUxButton(this.mainContent);
    return button.byTextContains(text);
  }
  positionRadiobutton(value) {
    return this.mainContent +  '//label[text()="'+ value +'"]';
  }
  get allowStickyGrowlCheckbox() {
    return this.mainContent +  '//label[text()="Sticky growl"]';
  }
  get stickyInput() {
    return this.mainContent +  '//input[@id="checkbox1"]';
  }
}


