import Component from '../../component.js'
import { elementAttributeContains } from '../../../core/utils.js'

export default class CoEuiLabel extends Component {
    constructor(parent) {
      let selector = '*[self::span[@euiLabel] or self::label[@euiLabel] or self::eui-label or self::a[@euiLabel]]' ;
      super(parent, selector);
      // https://webgate.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components-next/src/lib/components/atoms/eui-label/eui-label.component.ts
    }
    async isRequired() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-label--required');
    }
    async isReadOnly() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-label--readonly');
    }
}


