import Component from '../component.js';
import CoEuiIconSvg from './eui-icon-svg.js';
import CoEuiTreeNodeWrapperContainerRightChip from './eui-tree-node-wrapper-container-right-chip.js';
import CoEuiTreeNodeWrapperContainerRightBadge from './eui-tree-node-wrapper-container-right-badge.js';
import CoEuiDropdown from './eui-dropdown.js';
import CoEuiDropdownContent from './eui-dropdown-content.js';
import CoEuiButton from './eui-button.js';

export default class CoEuiTreeNodeWrapperContainerRight extends Component {

  constructor(parent) {
    let selector = 'div[contains(@class,"eui-tree-node-wrapper__container-right")]';
    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
  }

  get badgeCO() {
    return new CoEuiTreeNodeWrapperContainerRightBadge(this.currentPath);
  }
  get chipCO() {
    return new CoEuiTreeNodeWrapperContainerRightChip(this.currentPath);
  }
  get dropdownCO() {
    return new CoEuiDropdown(this.currentPath).addPredicateClassContains('eui-u-ml-xs');
  }
  async hasDropdown() {
    return await (await $(this.dropdownCO.currentPath)).isExisting();
  }
  get dropdownButtonCO() {
    return new CoEuiButton(this.dropdownCO);
  }
  get iconSvgCO() {
    return new CoEuiIconSvg(this.dropdownButtonCO).addPredicateIconContains('eui-ellipsis-vertical');
  }
  get dropdownContentCO() {
    return new CoEuiDropdownContent(this.dropdownCO);
  }
}


