import{Ga as r,Qb as I,Y as s,Za as m,ab as c,bb as h,ea as g,ib as u,pb as p,yb as d}from"./chunk-A3TP776U.js";function x(n,a){if(n&1&&p(0,"img",0),n&2){let t=d();h("src",t.imageUrl,r),c("class",t.class||null)("width",t.width||(t.options==null?null:t.options.width)||(t.legacyImage==null?null:t.legacyImage.width)||"auto")("height",t.height||(t.options==null?null:t.options.height)||(t.legacyImage==null?null:t.legacyImage.height)||"100%")("title",(t.options==null?null:t.options.title)||(t.legacyImage==null?null:t.legacyImage.title)||null)("alt",(t.options==null?null:t.options.alt)||(t.legacyImage==null?null:t.legacyImage.alt)||null)}}var M=(()=>{let a=class a{constructor(){this.options={},this.legacyImage={},this.mode="desktopMode",this.class="",this.width="",this.height="",this.imageUrl=""}ngOnChanges(){this.imageUrl=this.getImageUrl()}getImageUrl(){let i="",{legacyImage:e={},options:l={},mode:y="desktopMode"}=this,{originalImage:o={}}=l,f=!!(o&&o.url),U=!!(e&&e.url);if(f||U){let w=o.url||e.url,C=l[y]||{},P=this.getImageUrlParams(C);i=`${w}${P}`}return i}getImageUrlParams(i){let l=`${new URLSearchParams(i).toString()}`;return l?`?${l}`:""}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=s({type:a,selectors:[["at-image"]],inputs:{options:"options",legacyImage:"legacyImage",mode:"mode",class:"class",width:"width",height:"height"},standalone:!0,features:[g,I],decls:1,vars:1,consts:[["loading","lazy",3,"src"]],template:function(e,l){e&1&&m(0,x,1,6,"img",0),e&2&&u(0,l.imageUrl?0:-1)},encapsulation:2});let n=a;return n})();export{M as a};
