import { z as d, A as p, C as m } from "./en_US-IFPOGBSL-Dqe3iO9V.js";
import { n as h } from "./class-map-XI7Wqjhq.js";
import { r as f, c as u } from "./tron-connector-BnzT4sSK.js";
import { c as b } from "./index-CpqFqHIq.js";
const g = d`
  :host {
    display: block;
    width: var(--local-width);
    height: var(--local-height);
  }

  :host([data-object-fit='cover']) img {
    object-fit: cover;
    object-position: center center;
  }

  :host([data-object-fit='contain']) img {
    object-fit: contain;
    object-position: center center;
  }

  img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
  }
`;
var r = function(s, i, o, c) {
  var a = arguments.length, t = a < 3 ? i : c === null ? c = Object.getOwnPropertyDescriptor(i, o) : c, n;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(s, i, o, c);
  else for (var l = s.length - 1; l >= 0; l--) (n = s[l]) && (t = (a < 3 ? n(t) : a > 3 ? n(i, o, t) : n(i, o)) || t);
  return a > 3 && t && Object.defineProperty(i, o, t), t;
};
let e = class extends p {
  constructor() {
    super(...arguments), this.src = "./path/to/image.jpg", this.alt = "Image", this.size = void 0, this.objectFit = "cover";
  }
  render() {
    return this.objectFit && (this.dataset.objectFit = this.objectFit), this.style.cssText = `
      --local-width: ${this.size ? `var(--wui-icon-size-${this.size});` : "100%"};
      --local-height: ${this.size ? `var(--wui-icon-size-${this.size});` : "100%"};
      `, m`<img src=${this.src} alt=${this.alt} @error=${this.handleImageError} />`;
  }
  handleImageError() {
    this.dispatchEvent(new CustomEvent("onLoadError", { bubbles: !0, composed: !0 }));
  }
};
e.styles = [f, u, g];
r([
  h()
], e.prototype, "src", void 0);
r([
  h()
], e.prototype, "alt", void 0);
r([
  h()
], e.prototype, "size", void 0);
r([
  h()
], e.prototype, "objectFit", void 0);
e = r([
  b("wui-image")
], e);
