import Component from '../../component.js'

export default class CoUxTimebarLegendItem extends Component {
  constructor(parent) {
    let selector = 'div[contains(@class, "ux-timebar__legend-item")]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-timebar/ux-timebar.component.html
  }
  get itemIcon() {
    let path = '//div[contains(@class,"ux-timebar__legend-item-icon")]';
    return this.currentPath + path;
  }
  get circleIcon() {
    let path = '//span[contains(@class,"ux-icon-circle")]';
    return this.itemIcon + path;
  }
  get indexWrapper() {
    let path = '//div[contains(@class,"ux-timebar__legend-item-index-wrapper")]';
    return this.currentPath + path;
  }
  async isShowLegendAsIndexGenerated() {
    return await (await $(this.indexWrapper)).isExisting();
  }
  get label() {
    let path = '//div[contains(@class,"ux-timebar__legend-item-label")]';
    return this.currentPath + path;
  }
}

