import Component from '../../component.js'
import CoUxDiscussionThreadItem from './ux-discussion-thread-item.js'

export default class CoUxDiscussionThread extends Component {

  constructor(parent) {
    let selector = 'ux-discussion-thread';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-discussion-thread/ux-discussion-thread.component.html
  }
  get dataE2E()  {
    let path = '//div[@data-e2e = "ux-discussion-thread"]';
    return this.currentPath + path;
  }
  get title()  {
    let path = '//div[contains(@class,"section-title")]';
    return this.dataE2E + path;
  }
  get subtitle()  {
    let path = '//div[contains(@class,"section-sub-title") and contains(@class,"ux-u-font-size-h5")]';
    return this.dataE2E + path;
  }
  get list()  {
    let path = '//ul[contains(@class,"ux-discussion-thread")]';
    return this.dataE2E + path;
  }
  get discussionThreadItemCO() {
    return new CoUxDiscussionThreadItem(this.list);
  }

  discussionThreadItemByIndex(index) {
    return this.discussionThreadItemCO.byIndex(index);
  }

}


