import Component  from '../component.js'

export default class CoEuiChip extends Component {
    constructor(parent) {
      let selector = 'eui-chip[@data-e2e = "eui-chip"]';
      super(parent, selector);
    }
    get matBasicChip() {
      let path = '//mat-basic-chip[contains(@class, "mat-chip")]';
      return this.currentPath + path;
    }
    get chipContent() {
      let path = '//div[@class = "eui-chip__content-container"]';
      return this.matBasicChip + path;
    }
    get chipLabel() {
      let path = '//span[@class = "eui-label"]';
      return this.chipContent + path;
    }
    get chipRemoveIcon() {
      let path = '//span[contains(@class, "eui-chip__remove-icon")]';
      return this.matBasicChip + path;
    }
    async isRemovable() {
      let cl = await (await $(this.matBasicChip + '//span[contains(@class, "eui-chip__remove-icon")]')).isExisting();
      if ( cl ) {
         return true;
      } else {
         return false;
      }
    }

}


