import Component from '../../component.js'
import CoUxLayoutSidebarItem from './ux-layout-sidebar-item.js'
import { elementAttributeContains } from '../../../core/utils.js'

export default class CoUxLayoutSidebarItems extends Component {
    constructor(parent) {
      let selector = 'ux-layout-sidebar-items';
      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-sidebar/ux-layout-sidebar-items.component.ts
    }
    get sideBarItems() {
      let path = '//div[@data-e2e="ux-layout-sidebar-items"]';
      return this.currentPath + path;
    }
    async isInnerNavigationSidebar() {
      return await elementAttributeContains(this.sideBarItems, 'class', 'sidebar-items--inner-navigation-sidebar');
    }
    get sidebarItemCO(){
      return new CoUxLayoutSidebarItem(this.sideBarItems);
    }
}


