import Component from '../component.js';
import DivComponent from '../div.js';
import SpanComponent from '../span.js';
import CoEuiGrowlItem from './eui-growl-item.js';
import CoEuiIconButton from './eui-icon-button.js';
import CoEuiIconSvg from './eui-icon-svg.js';

export default class CoEuiGrowl extends Component {
  constructor(parent) {
    let selector = 'eui-growl';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-growl/eui-growl.component.html
  }
  get growlItemCO() {
    return new CoEuiGrowlItem(this.currentPath);
  }
  get growlItemContainerInfoCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-growl-item-container--secondary');
  }
  get growlItemInfoCO() {
    return new DivComponent(this.growlItemContainerInfoCO).addPredicateClassContains('eui-growl-item');
  }
  get growlItemMessageInfoCO() {
    return new DivComponent(this.growlItemInfoCO).addPredicateClassContains('eui-growl-item-summary-wrapper');
  }
  get growlItemMessageInfoIconCO(){
    return new CoEuiIconSvg(this.growlItemMessageInfoCO);
  }
  get growlTitleInfoCO() {
    return new SpanComponent(this.growlItemMessageInfoCO).addPredicateClassContains('eui-growl-item-title');
  }
  get growlItemInfoCloseCO() {
    return new CoEuiIconButton(this.growlItemInfoCO).addPredicateClassContains('eui-growl-item-close');
  }
}
