import Component  from '../component.js'
import CoUxChip from './ux-chip.js'

export default class CoUxChipsListDroppableArea extends Component {
    constructor(parent) {
      let selector = 'div[@data-e2e = "ux-chips-list-droppable-area"]';
      super(parent, selector);
    }
    get droppableAreaWrapper() {
      let path = '//div[contains(@class, "ux-chips-list-droppable-area__wrapper")]';
      return this.currentPath + path;
    }
    get chipList() {
      let path = '//mat-chip-list[@data-e2e = "ux-chips-list-droppable-area-chip-list"]';
      return this.droppableAreaWrapper + path;
    }
    get chipListWrapper() {
      let path = '//div[contains(@class, "mat-chip-list-wrapper")]';
      return this.chipList + path;
    }
    get chipCO() {
      return new CoUxChip(this.chipListWrapper);
    }
    async chipCount() {
      let list = await this.chipCO.elementList();
      return await list.length;
    }
}


