import CoUxWizardStep from '../../../../components/10x/ux/ux-wizard-step.js';
import CoUxWizardSteps from '../../../../components/10x/ux/ux-wizard-steps.js';
import EuiBasePage from '../eui-base.po.js';

export default class WizardStepPage extends EuiBasePage {

  constructor() {
      super();
  }

  /**
   * Returns the index-nth CoUxWizardStep from the page
   * @param index - index of the component
   * @returns CoUxWizardStep
   */
  stepByIndex(index) {
    let step =  new CoUxWizardSteps(this.mainContent).wizardStepCO;
    return step.byIndex(index);
  }
  /**
   * Returns the index-nth CoUxWizardSteps from the page
   * @param index - index of the component
   * @returns CoUxWizardSteps
   */
  stepsByIndex(index) {
    let steps =  new CoUxWizardSteps(this.mainContent);
    return steps.byIndex(index);
  }


  /**
   * Returns the CoUxWizardStep from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxWizardStep
   */
  stepByTextContains(text) {
    let step = new CoUxWizardSteps(this.mainContent).wizardStepCO;
    return step.byTextContains(text);
  }
  /**
   * Returns the CoUxWizardSteps from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxWizardSteps
   */
  stepsByTextContains(text) {
    let steps = new CoUxWizardSteps(this.mainContent);
    return steps.byTextContains(text);
  }

  /**
   * Returns the CoUxWizardStep from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxWizardStep
   */
  stepByTextEqualsAndIndex(text, index, normalize=true) {
    let step = new CoUxWizardSteps(this.mainContent).wizardStepCO;
    return step.byTextEqualsAndIndex(text, index, normalize);
  }
   /**
   * Returns the CoUxWizardSteps from the page that contains the text
   * @param text - text to be contained
   * @returns CoUxWizardSteps
   */
  stepsByTextEqualsAndIndex(text, index, normalize=true) {
    let steps = new CoUxWizardSteps(this.mainContent);
    return steps.byTextEqualsAndIndex(text, index, normalize);
  }
  /**
   * Returns the CoUxWizardStep from the page that contains the section
   * @param id - id to be contained
   * @returns CoUxWizardStep
   */
  stepFromSectionById(id) {
    return new CoUxWizardStep(this.sectionById(id));
  }
  /**
   * Returns the CoUxWizardSteps from the page that contains the section
   * @param id - id to be contained
   * @returns CoUxWizardSteps
   */
   stepsFromSectionById(id) {
    return new CoUxWizardSteps(this.sectionById(id));
  }
  /**
   * Returns the CoUxWizardStep from the page that contains the section and index
   * @param id - id to be contained
   * @param index - index of the component
   * @returns CoUxWizardStep
   */
  stepFromSectionWithIdByIndex(id, index) {
    let step = new CoUxWizardStep(this.sectionById(id));
    return step.byIndex(index);
  }
    /**
   * Returns the CoUxWizardSteps from the page that contains the section and index
   * @param id - id to be contained
   * @param index - index of the component
   * @returns CoUxWizardSteps
   */
  stepsFromSectionWithIdByIndex(id, index) {
      let step = new CoUxWizardSteps(this.sectionById(id));
      return step.byIndex(index);
    }
}


