import { elementAttributeContains } from '../../core/utils.js';
import SelectComponent from '../select.js';

export default class CoEuiSelect extends SelectComponent {
  constructor(parent) {
    let selector = 'select[@euiSelect]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-select/eui-select.component.ts
  }
  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');
  }
}


