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-next/src/lib/components/eui-card/components/eui-card-media/eui-card-media.component.html
  }
  get container() {
    let path = '//div[contains(@class,"eui-card-media__container")]';
    return this.currentPath + path;
  }
  get image() {
    let path = '//span';
    return this.container + path;
  }
  get routerlink() {
    let path = '//a[@routerLink]';
    return this.image + path;
  }
  async hasInternalUrl() {
    return await (await $(this.routerlink)).isExisting();
  }
  get routerlink() {
    let path = '//a[@href]';
    return this.image + path;
  }
  async hasExternalUrl() {
    return await (await $(this.routerlink)).isExisting();
  }
  get image() {
    let path = '//img';
    return this.currentPath + path;
  }
  get legend() {
    let path = '//div[contains(@class,"eui-card-media__legend")]';
    return this.currentPath + path;
  }
  async hasLegend() {
    return await (await $(this.legend)).isExisting();
  }
}


