import Component from '../component.js';
import CoEuiIcon from './eui-icon.js';
import CoEuiIconSvg from './eui-icon-svg.js';
import CoEuiInputCheckbox from './eui-input-checkbox.js';
import CoEuiTreeNodeWrapperContainerLeftChip from './eui-tree-node-wrapper-container-left-chip.js';
import CoEuiBadge from './eui-badge.js';

export default class CoEuiTreeNodeWrapperContainerLeft extends Component {

  constructor(parent) {
    let selector = 'div[contains(@class,"eui-tree-node-wrapper__container-left")]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-tree/eui-tree.component.html?at=master
  }
  async isSelected() {
    return await (await $(this.currentPath + '/self::div[contains(@class,"eui-tree-node-wrapper__container-left--selected")]')).isExisting();
  }
  get checkboxCO() {
    return new CoEuiInputCheckbox(this.currentPath).addPredicateClassContains('eui-u-mr-m');
  }
  async isSelectable() {
    return await (await $(this.checkboxCO.currentPath)).isExisting();
  }
  get iconCO() {
    return new CoEuiIcon(this.currentPath).addPredicateClassContains('eui-u-mr-xs');
  }
  async hasIconClass() {
    return await (await $(this.iconCO.currentPath)).isExisting();
  }
  get iconSvgCO() {
    return new CoEuiIconSvg(this.currentPath).addPredicateClassContains('eui-u-mr-xs');
  }
  async hasIconSvgName() {
    return await (await $(this.iconSvgCO.currentPath)).isExisting();
  }
  get treeNodeWrapperContainerLeftChipCO() {
    return new CoEuiTreeNodeWrapperContainerLeftChip(this.currentPath);
  }
  async hasChip() {
    return await (await $(this.chipCO.currentPath)).isExisting();
  }
  get badgeCO() {
    return new CoEuiBadge(this.currentPath).addPredicateClassContains('eui-u-flex-no-shrink');
  }
  async hasBadge() {
    return await (await $(this.badgeCO.currentPath)).isExisting();
  }
}


