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

export default class CoUxAtag extends Component {
    constructor(parent) {
      let selector = 'ux-a-tag';
      super(parent, selector);
     //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/core/src/lib/commons/ux-components/atomic/ux-a-tag/ux-a-tag.component.html?at=support/7.x
    }
    get dataE2E() {
      let path = '//div[@data-e2e="ux-a-tag"]';
      return this.currentPath + path;
    }
    get tagLabel() {
      let path = '//span[contains(@class,"ux-a-tag__label")]';
      return this.dataE2E + path;
    }
    get tagSubLabel() {
      const path = '//span[contains(@class,"ux-a-tag__sub-label")]';
      return this.dataE2E + path;
    }
    async isRounded() {
      return await elementAttributeContains(this.dataE2E, 'class', 'ux-a-tag--rounded');
    }
    async isSmall() {
      return await elementAttributeContains(this.dataE2E, 'class', 'ux-a-tag--small');
    }
}


