import Component  from '../component.js'
import CoEuiMenuSubItems from './eui-menu-sub-items.js'
import UlComponent from '../ul.js';

export default class CoEuiMenuItems extends Component {
  constructor(parent) {
    let selector = 'eui-menu-item';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-menu/eui-menu.component.html?at=support/13.x
  }
  get listCO(){
    return new UlComponent(this.currentPath).byAttributeContains('class','eui-menu-sub');
  }
  async isExpendedHasChildren(){
    return await( await $(this.listCO.currentPath)).isExisting();
  }
  get subItemCO(){
    return new CoEuiMenuSubItems(this.listCO);
  }
  
}


