import Component  from '../component.js'
import CoEuiOverlayHeader from './eui-overlay-header.js'
import CoEuiOverlayFooter from './eui-overlay-footer.js'
import CoEuiOverlayBody from './eui-overlay-body.js'
import DivComponent from '../div.js';

export default class CoEuiOverlay extends Component {
  constructor(parent) {
    let selector = 'eui-overlay';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-overlay/eui-overlay.component.html?at=master
  }
  get wrapperCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-overlay-wrapper');
  }
  async isActive() {
    return await (await this.wrapperCO.element()).isExisting();
  }
  get euiOverlayHeaderCO() {
    return new CoEuiOverlayHeader(this.wrapperCO);
  }
  get euiOverlayFooterCO() {
    return new CoEuiOverlayFooter(this.wrapperCO);
  }
  get euiOverlayBodyCO() {
    return new CoEuiOverlayBody(this.wrapperCO);
  }
}


