import Component from '../component.js';
import DivComponent from '../div.js';
import CoEuiAvatarBadge from './eui-avatar-badge.js';
import CoEuiAvatarIcon from './eui-avatar-icon.js';
import CoEuiAvatarImage from './eui-avatar-image.js';
import CoEuiAvatarText from './eui-avatar-text.js';

export default class CoEuiAvatar extends Component {
  constructor(parent) {
    let selector = '*[self::eui-avatar or self::div[@euiAvatar] or self::span[@euiAvatar]]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-avatar/eui-avatar.component.html?at=refs%2Fheads%2Fmaster
  }
  get shadowCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains("eui-avatar-shadow");
  }
  get contentCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains("eui-avatar-content");
  }
  get avatarIconCO() {
    return new CoEuiAvatarIcon(this.contentCO);
  }
  get avatarTextCO() {
    return new CoEuiAvatarText(this.contentCO);
  }
  get avatarImageCO() {
    return new CoEuiAvatarImage(this.contentCO);
  }
  get avatarBadgeCO() {
    return new CoEuiAvatarBadge(this.contentCO);
  }
}
