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'

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=support%2F13.x
  }
  get wrapper() {
    let path = '//div[contains(@class,"eui-overlay-wrapper")]';
    return this.currentPath + path;
  }
  async isActive() {
    return await (await $(this.wrapper)).isExisting();
  }
  get euiOverlayHeaderCO() {
    return new CoEuiOverlayHeader(this.wrapper);
  }
  get euiOverlayFooterCO() {
    return new CoEuiOverlayFooter(this.wrapper);
  }
  get euiOverlayBodyCO() {
    return new CoEuiOverlayBody(this.wrapper);
  }
}


