import Component  from '../component.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?at=support%2F13.x
  }
  get content() {
    return this.currentPath + '//nav[contains(@class, "eui-toolbar-menu-content")]';
  }
  async hasItems() {
    return await (await $(this.content)).isExisting();
  }
  get ulContentCO() {
    return new UlComponent(this.content);
  }
  get item() {
    return new CoEuiToolbarMenuItem(this.ulContentCO);
  }
}


