import Component  from '../component.js'

export default class CoEuiCardHeader extends Component {
  constructor(parent) {
    let selector = 'eui-card-media';
    super(parent, selector);
    // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-card/components/eui-card-media/eui-card-media.component.html?at=support/13.x
  }
  get container() {
    return this.currentPath + '//div[contains(@class,"eui-card-media__container")]';
  }
  get routerlink() {
    return this.container + '//a[@routerLink]';
  }
  async hasInternalUrl() {
    return await (await $(this.routerlink)).isExisting();
  }
  get externalUrl() {
    return this.container + '//a[@href]';
  }
  async hasExternalUrl() {
    return await (await $(this.externalUrl)).isExisting();
  }
  get image() {
    return this.currentPath + '//img';
  }
  get legend() {
    return this.currentPath + '//div[contains(@class,"eui-card-media__legend")]';
  }
  async hasLegend() {
    return await (await $(this.legend)).isExisting();
  }
}


