import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

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

const SwAvatar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    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 style() { return swAvatarCss; }
}, [1, "sw-avatar"]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sw-avatar"];
  components.forEach(tagName => { switch (tagName) {
    case "sw-avatar":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, SwAvatar$1);
      }
      break;
  } });
}
defineCustomElement$1();

const SwAvatar = SwAvatar$1;
const defineCustomElement = defineCustomElement$1;

export { SwAvatar, defineCustomElement };
