import Component  from '../component.js'

export default class CoUxAicon extends Component {
    constructor(parent) {
      let selector = 'div[@data-e2e="ux-a-icon"]';
      super(parent, selector);
    }
    get icon() {
      let path = '//span[contains(@class,"ux-icon-fw") and contains(@class,"ux-a-icon__icon")]';
      return this.currentPath + path;
    }
    get iconTag() {
      let path = '//span[contains(@class,"ux-a-icon__tag")]';
      return this.icon + path;
    }
    async isEmptyTag() {
      let cl = await(await $(this.iconTag)).getAttribute('class');
      if (cl.includes('ux-a-icon__tag--empty')) {
         return true;
      } else {
         return false;
      }
    }
    get tagLabel() {
      let path = '//span[contains(@class,"ux-a-icon__tag")]//span';
      return this.icon + path;
    }

}


