import CoUxDatepicker from '../../../../components/10x/ux/ux-datepicker.js'
import EuiBasePage from '../eui-base.po.js'
import MatSlideToggle from '../../../../components/material/mat-slide-toggle.js'
import CoUxButton from '../../../../components/10x/ux/ux-button.js'

export default class UxDatePickerPage extends EuiBasePage {
  constructor() {
      super();
  }
  datepickerByIndex(index) {
    return new CoUxDatepicker(this.root).byIndex(index);
  }
  datepickerById(id) {
    return new CoUxDatepicker(this.root).byId(id);
  }
  datepickerFromSectionById(id) {
    return new CoUxDatepicker(this.sectionById(id));
  }
  datepickerFromSectionByIdAndIndex(id, index) {
    return new CoUxDatepicker(this.sectionById(id)).byIndex(index);
  }
  buttonFromSectionByIdAndText(id, text) {
    return new CoUxButton(this.sectionById(id)).byTextContains(text);
  }
  sectionTitleFromSection(section, text) {
    return section + '//h6[contains(@class,"section-title") and contains(text(), "' + text +'")]';
  }
  matSlideToggleFromSection(id) {
    return new MatSlideToggle(this.sectionById(id));
  }
}


