import Component from '../component.js'
import DivComponent from '../div.js'
import CoEuiCardFooterActionButtons from './eui-card-footer-action-buttons.js'
import CoEuiCardFooterActionIcons from './eui-card-footer-action-icons.js'
import CoEuiCardFooterMenuContent from './eui-card-footer-menu-content.js'

export default class CoEuiCardFooter extends Component {
  constructor(parent) {
    let selector = 'eui-card-footer';
    super(parent, selector);
    // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-card/components/eui-card-footer/eui-card-footer.component.html?at=master
  }
  get containerCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-card-footer-container');
  }
  get actionsCO() {
    return new DivComponent(this.containerCO).addPredicateClassContains('eui-card-footer-actions');
  }
  async hasActionButtonsIconsMenu() {
    return await (await this.actionsCO.element()).isExisting();
  }
  get euiCardFooterActionButtonsCO() {
    return new CoEuiCardFooterActionButtons(this.actionsCO);
  }
  get actionsIconsContainerCO() {
    return new DivComponent(this.actionsCO).addPredicateClassContains('eui-card-footer-actions__icons-container');
  }
  async hasActionIconsContainer() {
    return await (await this.actionsIconsContainerCO.element()).isExisting();
  }
  get euiCardFooterActionIconsCO() {
    return new CoEuiCardFooterActionIcons(this.actionsIconsContainerCO);
  }
  async hasFooterActionIcons() {
    return await (await $(this.euiCardFooterActionIconsCO.currentPath)).isExisting();
  }
  get euiCardFooterMenuContentCO() {
    return new CoEuiCardFooterMenuContent(this.actionsIconsContainerCO);
  }
  async hasActionMenu() {
    return await (await this.euiCardFooterMenuContentCO.element()).isExisting();
  }
}


