import Component  from '../component.js'

export default class CoUxDropdownButtonItem extends Component {
    constructor(parent) {
      let selector = 'ux-dropdown-button-item';
      super(parent, selector);
    }
    get dataE2E() {
      return this.currentPath + '//button[@data-e2e = "ux-dropdown-button-item"]';
    }
    get buttonItemIcon() {
      let path = '//span[contains(@class,"ux-dropdown-button-item__icon")]';
      return this.dataE2E + path;
    }
    get buttopnItemLabel() {
      let path = '//span[text()]';
      return this.dataE2E + path;
    }
    get isDisabled() {
      let at = this.dataE2E.getAttribute('disabled');
      if (at === 'true') {
         return true;
      } else if (at === undefined) {
         return false;
      } else {
         return false;
      }
    }
    get dropdownMatmenu() {
      return (this.dataE2E + '/ancestor::ux-dropdown-button-item[1]//mat-menu');
    }
}


