import Component from '../../component.js';
import CoEuiIcon from './eui-icon.js';

export default class CoEuiBreadcrumbItem extends Component {
    constructor(parent) {
      let selector = 'eui-breadcrumb-item';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components-next/src/lib/layout/eui-breadcrumb/item/breadcrumb-item.component.html?at=support%2Fdevelop-10.x
    }
    get iconSeparator(){
      return new CoEuiIcon(this.currentPath);
    }
    async hasPrevious(){
      return await(await this.iconSeparator.element()).isExisting();
    }
    get link() {
      return this.currentPath + '//a';
    }
    async hasLink() {
      return await(await $(this.link)).isExisting();
    }
    get label() {
      return this.currentPath + '//span';
    }
}


