import Component from '../../component.js'
import CoEuiMenu from './eui-menu.js'
import { elementAttributeContains } from '../../../core/utils.js'

export default class CoEuiSidebarMenu extends Component {
  constructor(parent) {
    let selector = 'eui-sidebar-menu';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components-next/src/lib/layout/eui-sidebar-menu/eui-sidebar-menu.component.html
  }
  get container() {
    let path = '//div[contains(@class,"eui-sidebar-menu__container")]';
    return this.currentPath + path;
  }
  async isCollapsed() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-sidebar-menu__container--collapsed');
  }
  get content() {
    let path = '//div[contains(@class,"eui-sidebar-menu__content")]';
    return this.currentPath + path;
  }
  get euiMenuCO() {
    return new CoEuiMenu(this.content);
  }
}


