import Component from '../component.js'
import CoEuiDropdownContent from './eui-dropdown-content.js'
import CdkOverlayContainer from '../cdk-overlay-container.js'
import DivComponent from '../div.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?at=refs%2Fheads%2Fmaster
  }
  get dropdownTriggerCO() {
    return new DivComponent(this.currentPath).byClassContains('eui-dropdown__trigger-container');
  }
  get menuCO() {
    return new DivComponent(this.overlayContainer).byClassContains('eui-dropdown__panel-container');
  }
  get dropdownContentCO() {
    return new CoEuiDropdownContent(this.menuCO);
  }
}


