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

export default class CoEuiAutocompleteOption extends Component {
  constructor(parent) {
    let selector = 'eui-autocomplete-option';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-autocomplete/eui-autocomplete-option/eui-autocomplete-option.component.html
  }
  async isActive() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-autocomplete-option--active');
  }
  async isDisabled() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-autocomplete-option--disabled');
  }
  async isGroupItem() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-autocomplete-option--group-item');
  }
}