import Component from '../../component.js'
import CoUxTimelineItem from './ux-timeline-item.js'
import { elementAttributeContains } from '../../../core/utils.js'

export default class CoUxTimelineItems extends Component {
    constructor(parent) {
      let selector = 'ux-timeline-items';
      super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-timeline/ux-timeline-items.component.ts
    }
    get ul() {
      let path = '//ul[contains(@class,"ux-timeline-items")]';
      return this.currentPath + path;
    }
    async isLeftAligned() {
      return await elementAttributeContains(this.ul, 'class', 'ux-timeline-items__left-aligned');
    }
    get timelineItemCO() {
      return new CoUxTimelineItem(this.ul);
    }
    timelineItemByIndex(index) {
      return this.timelineItemCO.byIndex(index);
    }
}


