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

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