import Component from '../component.js';
import CoEuiLanguageSelector from './eui-language-selector.js';
import CoEuiHeaderLogo from './eui-header-logo.js';
import CoEuiHeaderEnvironment from './eui-header-environment.js';
import CoEuiHeaderApp from './eui-header-app.js';
import CoEuiHeaderUserProfile from './eui-header-user-profile.js';
import DivComponent from '../div.js'
import CoEuiHeaderRightContent from './eui-header-right-content.js';
import CoEuiHeaderSearch from './eui-header-search.js';

export default class CoEuiHeader extends Component {
  constructor(parent) {
    let selector = 'eui-header';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/layout/eui-header/header.component.html?at=refs%2Fheads%2Fmaster
  }
  get logoWrapperCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-header-logo-wrapper');
  }
  get euiHeaderLogoCO() {
    return new CoEuiHeaderLogo(this.logoWrapperCO);
  }
  get euiHeaderEnvironmentCO() {
    return new CoEuiHeaderEnvironment(this.logoWrapperCO);
  }
  get euiHeaderAppCO() {
    return new CoEuiHeaderApp(this.currentPath);
  }
  get rightContentCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-header-right-content-wrapper');
  }
  get euiHeaderRightContentCO(){
    return new CoEuiHeaderRightContent(this.rightContentCO);
  }
  get euiHeaderUserProfileCO() {
    return new CoEuiHeaderUserProfile(this.rightContentCO);
  }
  get euiLanguageSelectorCO() {
    return new CoEuiLanguageSelector(this.currentPath);
  }
  get euiHeaderSearchCO() {
    return new CoEuiHeaderSearch(this.currentPath);
  }
}

