import Component from '../component.js'

export default class CoEuiLabel extends Component {
  constructor(parent) {
    let selector = '*[self::label[@euilabel] or self::span[@euilabel] or self::div[@euilabel] or self::a[@euilabel] or self::eui-label or ' +
      'self::label[@euisublabel] or self::span[@euisublabel] or self::div[@euisublabel] or self::a[@euisublabel] or self::eui-sublabel]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-label/eui-label.component.ts?at=master
  }
  async isRequired() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-label--required")]')).isExisting();
  }
  async isReadOnly() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-label--readonly")]')).isExisting();
  }
  async isSubLabel() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-label--sublabel")]')).isExisting();
  }
}


