import Component from '../../component.js';
import DivComponent from '../div.js';
import CoEuiIconSvg from './eui-icon-svg.js';

export default class CoEuiProgressBar extends Component {
  constructor(parent) {
    let selector = 'eui-progress-bar';
    super(parent, selector);
     // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-progress-bar/eui-progress-bar.component.html?at=master
  }
  get headerCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-progress-bar__header');
  }
  get headerLabelCO() {
    return new DivComponent(this.headerCO).addPredicateClassContains('eui-progress-bar__header-label');
  }
  async hasLabel() {
    return await (await this.headerLabelCO.element()).isExisting();
  }
  get headerStatusCO() {
    return new DivComponent(this.headerCO).addPredicateClassContains('eui-progress-bar__header-status');
  }
  async hasStatusIcon() {
    return await (await this.headerStatusCO.element()).isExisting();
  }
  get successIconCO() {
    return new CoEuiIconSvg(this.headerStatusCO).addPredicateIconContains('eui-ecl-success');
  }
  async isSuccessIcon() {
    return await (await this.successIconCO.element()).isExisting();
  }
  get warningIconCO() {
    return new CoEuiIconSvg(this.headerStatusCO).addPredicateIconContains('eui-ecl-warning');
  }
  async isWarningIcon() {
    return await (await this.warningIconCO.element()).isExisting();
  }
  get errorIconCO() {
    return new CoEuiIconSvg(this.headerStatusCO).addPredicateIconContains('eui-ecl-error');
  }
  async isDangerIcon() {
    return await (await this.errorIconCO.element()).isExisting();
  }
  get indicatorContainerCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-progress-bar__indicator-container');
  }
  get indicatoCO() {
    return new DivComponent(this.indicatorContainerCO).addPredicateClassContains('eui-progress-bar__indicator');
  }
}

