import CoEuiDropdown from '../../../components/14x/eui-dropdown.js'
import ButtonComponent from '../../../components/button.js'
import EuiBasePage from './eui-base.po.js'

export default class EuiSplitButtonPage extends EuiBasePage {
  constructor() {
      super();
  }
  euiDropdownCoFromSectionWithIndex(text, index) {
    return new CoEuiDropdown(this.sectionById(text)).byIndex(index);
  }
  buttonCoFromSectionWithIndex(text, index) {
    return new ButtonComponent(this.sectionById(text)).byIndex(index);
  }
  get splitButton() {
    let path = '//div[contains(@class, "eui-split-button")]';
    return this.mainContent + path;
  }
  splitButtonFromSection(text) {
    let path = '//div[contains(@class, "eui-split-button")]';
    return this.sectionById(text) + path;
  }
  splitButtonByIndexFromSection(text, index) {
    return '(' + this.splitButtonFromSection(text) + ')[' + index + ']';
  }
}


