import{j as e,r as t,l as i,m as o}from"./p-BxEPsDRj.js";import{n as r,c as s}from"./p-CrMmJdZ6.js";import{o as n}from"./p-zNe_7rLp.js";var a=e`
  :host {
    display: block;
    width: var(--local-width);
    height: var(--local-height);
  }

  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: inherit;
    user-select: none;
    user-drag: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
  }

  :host([data-boxed='true']) {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
    border-radius: ${({borderRadius:e})=>e[2]};
  }

  :host([data-boxed='true']) img {
    width: 20px;
    height: 20px;
    border-radius: ${({borderRadius:e})=>e[16]};
  }

  :host([data-full='true']) img {
    width: 100%;
    height: 100%;
  }

  :host([data-boxed='true']) wui-icon {
    width: 20px;
    height: 20px;
  }

  :host([data-icon='error']) {
    background-color: ${({tokens:e})=>e.core.backgroundError};
  }

  :host([data-rounded='true']) {
    border-radius: ${({borderRadius:e})=>e[16]};
  }
`;var d=undefined&&undefined.__decorate||function(e,t,i,o){var r=arguments.length,s=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)if(n=e[a])s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s;return r>3&&s&&Object.defineProperty(t,i,s),s};let h=class e extends i{constructor(){super(...arguments);this.src="./path/to/image.jpg";this.alt="Image";this.size=undefined;this.boxed=false;this.rounded=false;this.fullSize=false}render(){const e={inherit:"inherit",xxs:"2",xs:"3",sm:"4",md:"4",mdl:"5",lg:"5",xl:"6",xxl:"7","3xl":"8","4xl":"9","5xl":"10"};this.style.cssText=`\n      --local-width: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"};\n      --local-height: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"};\n      `;this.dataset["boxed"]=this.boxed?"true":"false";this.dataset["rounded"]=this.rounded?"true":"false";this.dataset["full"]=this.fullSize?"true":"false";this.dataset["icon"]=this.iconColor||"inherit";if(this.icon){return o`<wui-icon
        color=${this.iconColor||"inherit"}
        name=${this.icon}
        size="lg"
      ></wui-icon> `}if(this.logo){return o`<wui-icon size="lg" color="inherit" name=${this.logo}></wui-icon> `}return o`<img src=${n(this.src)} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:true,composed:true}))}};h.styles=[t,a];d([r()],h.prototype,"src",void 0);d([r()],h.prototype,"logo",void 0);d([r()],h.prototype,"icon",void 0);d([r()],h.prototype,"iconColor",void 0);d([r()],h.prototype,"alt",void 0);d([r()],h.prototype,"size",void 0);d([r({type:Boolean})],h.prototype,"boxed",void 0);d([r({type:Boolean})],h.prototype,"rounded",void 0);d([r({type:Boolean})],h.prototype,"fullSize",void 0);h=d([s("wui-image")],h);
//# sourceMappingURL=p-CbOrugAV.js.map