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

export default class CoEuiSelect extends Component {
    constructor(parent) {
      let selector = 'select[@euiSelect]' ;
      super(parent, selector);
      // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components-next/src/lib/components/eui-select/eui-select.component.ts?at=refs%2Fheads%2Fsupport%2F10.x
    }
    async isMultiple() {
      return await elementAttributeContains(this.currentPath, 'multiple', 'true');
    }
    async isReadonly() {
      return await elementAttributeContains(this.currentPath, 'readonly', 'true');
    }
    async isInvalid() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-select--invalid');
    }
}


