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

export default class CoUxBadge extends Component {

    constructor(parent) {
      let selector = 'ux-badge';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-badge/ux-badge.component.html
    }
    get badgeDataSpan() {
      return this.currentPath + '//span[@data-e2e="ux-badge"]';
    }
    async isOutline() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--outline');
    }
    async isPill() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--pill');
    }
    async isLarge() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--large');
    }
    async isSmall() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--small');
    }
    async isTiny() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--tiny');
    }
    async isTinier() {
      return await elementAttributeContains(this.badgeDataSpan, 'class', 'ux-badge--tinier');
    }
}


