import Component  from '../component.js'

export default class CoUxBadgeGroup extends Component {
    constructor(parent) {
      let selector = 'span[@data-e2e="ux-badge-group"]';
      super(parent, selector);
    }
    get badgeLeft() {
      let path = '//span[contains(@class, "ux-badge-group__badge-left")]';
      return this.currentPath + path;
    }
    get badgeRight() {
      let path = '//span[contains(@class, "ux-badge-group__badge-right")]';
      return this.currentPath + path;
    }
    get isBadgeLeftPill() {
      let cl = this.badgeLeft.getAttribute('class');
      if (cl.includes('badge-pill')) {
         return true;
      } else {
         return false;
      }
    }
    async isBadgeRightPill() {
      let cl = await (await $(this.badgeRight)).getAttribute('class');
      if (cl.includes('badge-pill')) {
         return true;
      } else {
         return false;
      }
    }
    async isBadgeLeftSmall() {
      let cl = await (await $(this.badgeLeft)).getAttribute('class');
      if (cl.includes('badge--small')) {
         return true;
      } else {
         return false;
      }
    }
    async isBadgeRightSmall() {
      let cl = await (await $(this.badgeRight)).getAttribute('class');
      if (cl.includes('badge--small')) {
         return true;
      } else {
         return false;
      }
    }
    async isBadgeLeftLarge() {
      let cl = await (await $(this.badgeLeft)).getAttribute('class');
      if (cl.includes('badge--large')) {
         return true;
      } else {
         return false;
      }
    }
    async isBadgeRightLarge() {
      let cl = await (await $(this.badgeRight)).getAttribute('class');
      if (cl.includes('badge--large')) {
         return true;
      } else {
         return false;
      }
    }
}


