import Component from '../component.js'
import CoEuiCardHeader from './eui-card-header.js'
import CoEuiCardMedia from './eui-card-media.js'
import CoEuiCardContent from './eui-card-content.js'
import CoEuiCardFooter from './eui-card-footer.js'

export default class CoEuiCard extends Component {
  constructor(parent) {
    let selector = 'eui-card';
    super(parent, selector);
    // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-card/eui-card.component.html?at=master
  }
  get euiCardHeaderCO() {
    return new CoEuiCardHeader(this.currentPath);
  }
  get euiCardMediaCO() {
    return new CoEuiCardMedia(this.currentPath);
  }
  get euiCardContentCO() {
    return new CoEuiCardContent(this.currentPath);
  }
  get euiCardFooterCO() {
    return new CoEuiCardFooter(this.currentPath);
  }
  async isCollapsible() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--collapsible")]')).isExisting();
  }
  async isCollapsed() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"ui-card--collapsed")]')).isExisting();
  }
  async isSelected() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--selected")]')).isExisting();
  }
  async isUrgent() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--urgent")]')).isExisting();
  }
  async isNoShadow() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--no-shadow")]')).isExisting();
  }
  async isNoContentPadding() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--no-content-padding")]')).isExisting();
  }
  async isHoverable() {
    return await (await $(this.currentPath + '/self::*[contains(@class,"eui-card--hoverable")]')).isExisting();
  }
}


