import Component  from '../component.js';


export default class CoEuiDropdownItem extends Component {
    constructor(parent) {
      let selector = '*[self::eui-dropdown-item or self::*[@euiDropdownItem]]';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-dropdown/dropdown-item/eui-dropdown-item.component.html
    }

    get container() {
      return this.currentPath + '//div[contains(@class, "eui-dropdown-item__container")]';
    }
    get content() {
      return this.container + '//div[contains(@class, "eui-dropdown-item__content")]';
    }
    get contentText() {
      return this.content + '//div[contains(@class, "eui-dropdown-item__content-text")]';
    }
    get contentIcon() {
      return this.content + '//div[contains(@class, "eui-dropdown-item__content-icon")]';
    }
    async subDropdown(){
      return await(await $(this.contentIcon)).isExisting();
    }
    get iconCO() {
      return new CoEuiIconSvg(this.contentIcon);
    }
}


