import Component  from '../component.js';
import DivComponent from '../div.js';
import LiComponent from '../li.js';
import SpanComponent from '../span.js';


export default class CoEuiTimelineItem extends Component {
  constructor(parent) {
    let selector = 'eui-timeline-item';
    super(parent, selector);
  //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-timeline/eui-timeline-item.component.html
  }
  get timelineItemCO(){
    return new LiComponent(this.currentPath).addPredicateClassContains('eui-timeline-item');
  }
  get itemLeftContentCO(){
    return new DivComponent(this.timelineItemCO).addPredicateClassContains('eui-timeline-item__left-content');
  }
  get itemLeftContentDateCO(){
    return new DivComponent(this.itemLeftContentCO).addPredicateClassContains('eui-timeline-item__date');
  }
  async hasLeftContentDate(){
    return await (await this.itemLeftContentDateCO.element()).isExisting();
  }
  get itemLeftContentTimeCO(){
    return new DivComponent(this.itemLeftContentCO).addPredicateClassContains('eui-timeline-item__time');
  }
  async hasLeftContentTime(){
    return await (await this.itemLeftContentTimeCO.element()).isExisting();
  }
  get itemIconCO(){
    return new SpanComponent(this.timelineItemCO).addPredicateClassContains('eui-timeline-item__icon');
  }
  async isNotGroup(){
    return await (await this.itemIconCO.element()).isExisting();
  }
  get itemContentCO(){
    return new DivComponent(this.timelineItemCO).addPredicateClassContains('eui-timeline-item__content');
  }
  get customContentCO(){
    return new DivComponent(this.itemContentCO);
  }
  async hasNoCustomContentChildNodes(){
    return await (await this.customContentTitleCO.element()).isExisting();
  }
  get customContentTitleCO(){
    return new DivComponent(this.customContentCO).addPredicateClassContains('eui-timeline-item__title');
  }
  get customContentSubTitleCO(){
    return new DivComponent(this.customContentCO).addPredicateClassContains('eui-timeline-item__subtitle');
  }
  get customContentDateCO(){
    return new DivComponent(this.customContentCO).addPredicateClassContains('eui-timeline-item__date');
  }
  async hasCustomContentDate(){
    return await (await this.customContentDateCO.element()).isExisting();
  }
  get customContentTimeCO(){
    return new DivComponent(this.customContentCO).addPredicateClassContains('eui-timeline-item__time');
  }
  async hasCustomContentTime(){
    return await (await this.customContentTimeCO.element()).isExisting();
  }
}


