import Component  from '../component.js'

export default class CoUxBadge extends Component {
    constructor(parent) {
      let selector = 'ux-badge';
      super(parent, selector);
    }
    get dataE2E() {
       return this.currentPath + '//span[@data-e2e="ux-badge"]';
    }
    get isOutline() {
      let cl = this.dataE2E.getAttribute('class');
      if (cl.includes('ux-c-badge--outline')) {
         return true;
      } else {
         return false;
      }
    }
    get isPill() {
      let cl = this.dataE2E.getAttribute('class');
      if (cl.includes('badge-pill')) {
         return true;
      } else {
         return false;
      }
    }
    get isSmall() {
      let cl = this.dataE2E.getAttribute('class');
      if (cl.includes('badge--small')) {
         return true;
      } else {
         return false;
      }
    }
    get isLarge() {
      let cl = this.dataE2E.getAttribute('class');
      if (cl.includes('badge--large')) {
         return true;
      } else {
         return false;
      }
    }
    get isTiny() {
      let cl = this.dataE2E.getAttribute('class');
      if (cl.includes('badge--tiny')) {
         return true;
      } else {
         return false;
      }
    }
}

