import Component  from '../component.js'
import CoEuiDropdownContent from './eui-dropdown-content.js'
import CdkOverlayContainer from '../cdk-overlay-container.js'

export default class CoEuiDropdown extends Component {
    overlayContainer;
    constructor(parent) {
      let selector = 'eui-dropdown';
      super(parent, selector);
      this.overlayContainer = new CdkOverlayContainer('//body');
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-dropdown/eui-dropdown.component.html
    }
    get dropdownTrigger() {
      return this.currentPath +  '//div[contains(@class, "eui-dropdown__trigger-container")]';
    }
    get menu(){
      return this.overlayContainer.currentPath + '//div[contains(@class, "eui-dropdown__panel-container")]';
    }
    get dropdownContentCO(){
      return new CoEuiDropdownContent(this.menu);
    }
}


