import Component from '../../component.js';
import DivComponent from '../div.js';
import CoEuiIconState from './eui-icon-state.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 statusIconCO(){
    return new CoEuiIconState(this.headerStatusCO)
  }
  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');
  }
}

