import Component from '../component.js';
import NavComponent from '../nav.js';
import UlComponent from '../ul.js';
import CoEuiToolbarMenuItem from './eui-toolbar-menu-item.js';

export default class CoEuiToolbarMenu extends Component {
  constructor(parent) {
    let selector = 'eui-toolbar-menu';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/layout/eui-toolbar/toolbar-menu/toolbar-menu.component.html
  }
  get contentCO() {
    return new NavComponent(this.currentPath).addPredicateClassContains('eui-toolbar-menu-content');
  }
  async hasItems() {
    return await (await this.contentCO.element()).isExisting();
  }
  get ulContentCO() {
    return new UlComponent(this.contentCO);
  }
  get itemCO() {
    return new CoEuiToolbarMenuItem(this.ulContentCO);
  }
}


