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

export default class CoEuiAccordionItem extends Component {
  constructor(parent) {
    let selector = 'eui-accordion-item';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-accordion/eui-accordion-item.component.html?at=master
  }
  get buttonCO() {
    return new ButtonComponent(this.currentPath).addPredicateClassContains('eui-accordion-item__header');
  }
  get header() {
    return this.buttonCO.currentPath + '//eui-accordion-item-header';
  }
  get headerExpanderCO() {
    return new DivComponent(this.buttonCO).addPredicateClassContains('eui-accordion-item__header-expander');
  }
  get expanderIconMinusCO() {
    return new CoEuiIconSvg(this.headerExpanderCO).addPredicateIconContains('eui-ecl-minus');
  }
  get expanderIconPlusCO() {
    return new CoEuiIconSvg(this.headerExpanderCO).addPredicateIconContains('eui-ecl-plus');
  }
  get bodyCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-accordion-item__body');
  }
}
