import Component from '../component.js';

export default class CoEuiInputText extends Component {
  constructor(parent) {
    let selector = 'input[@euiInputText]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-input-text/eui-input-text.component.ts?at=master
  }
  async isInvalid() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-input-text--invalid")]')).isExisting();
  }
  async isReadOnly() {
    return await (await $(this.currentPath + '/self::*[@readonly]')).isExisting();
  }
  async isDisabled() {
    return await (await $(this.currentPath + '/self::*[@disabled]')).isExisting();
  }
  async isClearable() {
    return await (await $(this.currentPath + '/self::*[@euiClearable]')).isExisting();
  }
}
