import { h } from '@stencil/core';
export class SwAvatar {
  constructor() {
    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 }));
  }
  static get is() { return "sw-avatar"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["sw-avatar.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["sw-avatar.css"]
    };
  }
}
