import Component from '../../component.js'
import CoEuiChip from './eui-chip.js'

export default class CoEuiModalPickerItem extends Component {
  constructor(parent) {
    let selector = 'span[contains(@class,"eui-modal-picker__items__item") and contains(@class,"col-3")]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components-next/src/lib/components/eui-picker/modal-picker/eui-modal-picker.component.html
  }
  get euiChipCO() {
    return new CoEuiChip(this.currentPath);
  }
  async isSelected() {
    return await (await $(this.euiChipCO.currentPath +'self::*[@euiPrimary]')).isExisting()
  }
  get label() {
    return this.euiChipCO.currentPath + '//span';
  }
}


