import Component from '../component.js'
import CoEuiUserProfile from './eui-user-profile.js'
import CoEuiUserProfileMenu from './eui-user-profile-menu.js'


export default class CoEuiHeaderUserProfile extends Component {
  constructor(parent) {
    let selector = 'eui-header-user-profile';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/layout/eui-header/header-user-profile/header-user-profile.component.html
  }
  get euiUserProfileCO() {
    return new CoEuiUserProfile(this.currentPath);
  }
  get euiUserProfileMenuCO() {
    return new CoEuiUserProfileMenu(this.euiUserProfileCO);
  }
  async hasUserProfileMenu() {
    return await (await this.euiUserProfileCO.element()).isExisting();
  }
}
