import ButtonComponent from '../button.js'
import Component from '../component.js'
import SpanComponent from '../span.js'
import CoEuiDropdownButtonChildMenu from './eui-dropdown-button-child-menu.js'


export default class CoEuiDropdownButtonMenuItem extends Component {
    constructor(parent) {
      super(parent);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-dropdown-button-menu/eui-dropdown-button-menu.component.html
    }
    get buttonCO(){
      return new ButtonComponent(this.currentPath).addSelectorPredicate('[@mat-menu-item]')
    }
    get iconCO(){
      return new SpanComponent(this.buttonCO).addPredicateClassContains('eui-icon')
    }
    async hasIcon(){
      return await (await this.iconCO.element()).isExisting()
    }
    get childMenuCO(){
      return new CoEuiDropdownButtonChildMenu(this.currentPath);
    }
    async hasChildren(){
      return await (await this.childMenuCO.element()).isExisting();
    }
}