import { r as registerInstance, h } from './index-ee578edf.js';

const synbeeAvatarCss = ":host{display:block}img{width:40px;height:40px;border-radius:10px}";

const SynbeeAvatar = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.domainName = 'https://app.synbee.it/it';
    this.imageBaseUrl = '/services/eolo-api-documentsmanaging/api/profile-image/get/';
    this.name = './assets/img/user.svg';
    this.src = '';
  }
  componentWillLoad() {
    switch (true) {
      case this.src === undefined:
        return './assets/img/user.svg';
      case this.src === null:
        return './assets/img/user.svg';
      case this.src === '':
        return './assets/img/user.svg';
      case this.src.includes('http'):
        return this.src;
      case this.src.includes('data:image'):
        return this.src;
      default:
        return this.domainName + this.imageBaseUrl + this.src;
    }
  }
  render() {
    return (h("img", { src: this.src }));
  }
};
SynbeeAvatar.style = synbeeAvatarCss;

export { SynbeeAvatar as synbee_avatar };
