import CoEuiDatepicker from '../../../components/14x/eui-datepicker.js'
import EuiBasePage from './eui-base.po.js'
import MatSlideToggle from '../../../components/material/mat-slide-toggle.js'
import MatDatepickerContent from '../../../components/material/mat-datepicker-content.js'
import CoEuiButton from '../../../components/14x/eui-button.js'

export default class EuiDatepickerPage extends EuiBasePage {
  constructor() {
      super();
  }
  datepickerByIndex(index) {
    return new CoEuiDatepicker(this.root).byIndex(index);
  }
  datepickerById(id) {
    return new CoEuiDatepicker(this.root).byId(id);
  }
  datepickerFromSectionById(id) {
    return new CoEuiDatepicker(this.sectionById(id));
  }
  datepickerFromSectionByIdAndIndex(id, index) {
    return new CoEuiDatepicker(this.sectionById(id)).byIndex(index);
  }
  buttonFromSectionByIdAndText(id, text) {
    return new CoEuiButton(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));
  }
  get matDatepickerContentCO() {
    return new MatDatepickerContent(new CdkOverlayContainer(this.root));
  }
}


