import Component  from '../component.js'
import { elementAttributeContains } from '../../core/utils.js'

export default class MatChipList extends Component {
    constructor(parent) {
      let selector = 'mat-chip-list';
      super(parent, selector);
      // https://github.com/angular/components/blob/master/src/material/chips/chip-list.ts
    }
    get wrapper() {
      let path = '//div[contains(@class,"mat-chip-list-wrapper")]';
      return this.currentPath + path;
    }
    async isDisabled() {
      return await elementAttributeContains(this.currentPath, 'class', 'mat-chip-list-disabled');
    }
    async hasErrorState() {
      return await elementAttributeContains(this.currentPath, 'class', 'mat-chip-list-invalid');
    }
    async isRequired() {
      return await elementAttributeContains(this.currentPath, 'class', 'mat-chip-list-required');
    }
}

