import Component  from '../component.js'
import CoUxCarouselItem from '../7x/ux-carousel-item.js'

export default class CoUxCarouselItems extends Component {
    constructor(parent) {
      let selector = 'ux-carousel-items';
      super(parent, selector);
      // component link
      // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-carousel-item/ux-carousel-items.component.html
    }

    async isShowSummaryIndicators() {
      return await (await $(this.summaryIndicators)).isExisting();
    }

    get summaryIndicators() {
      return this.currentPath + '//div[contains(concat(" ", @class, " "), " ux-carousel-items__summary-indicators ")]';
    }

    get carouselItemsContainer() {
      return this.currentPath + '//div[contains(@class,"ux-carousel-items__container")]';
    }

    get carouselChartContainer() {
      return this.carouselItemsContainer + '//div[contains(@class,"ux-carousel-items__chart-container")]';
    }

    get arrowContainer() {
      return this.carouselItemsContainer + '//div[contains(@class,"ux-carousel-items__arrow-container")]';
    }

    get leftArrow() {
      return this.arrowContainer + '//span[contains(@class,"ux-icon-caret-left")]';
    }

    get rightArrow() {
      return this.arrowContainer + '//span[contains(@class,"ux-icon-caret-right")]';
    }

    get coUxCarouselItem() {
      return new CoUxCarouselItem(this.carouselItemsContainer);
    }
}


