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

export default class CoUxLayoutNavBarTopMenuItemSubChild extends Component {
  constructor(parent) {
    let selector = 'li[contains(@class, "child")]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/layout/ux-layout-app-shell/components/ux-layout-nav-bar/ux-layout-nav-bar-top-menu.component.ts?at=support/10.x
  }
  get childSubLink(){
    return this.currentPath + '//a[@routerlink]'
  }
  get childSubLinkIcon(){
    return this.childSubLink + '//i[contains(@class, "ux-icon-fw")]';
  }
  get childSubLinkNoUrl(){
    return this.currentPath + '//a[not(@routerlink)]'
  }
  get childSubLinkNoUrlIcon(){
    return this.childSubLinkNoUrl + '//i[contains(@class, "ux-icon-fw")]';
  }
  async hasChildSubLinkIcon(){
    return await ( await $(this.childSubLinkIcon)).isExisting();
  }
}

