System.register(["./index-legacy-BiCnHnDr.js","./containers-legacy-DlhFG1K3.js","./_plugin-vue_export-helper-legacy-BVIICed7.js"],function(e,t){"use strict";var o,n,a,l,d,i,r,u,c,s,v,h,p,g,y,x,b,f,m;return{setters:[e=>{o=e.u,n=e.r,a=e.a,l=e.c,d=e.n,i=e.o,r=e.b,u=e.d,c=e.w,s=e.e,v=e.v,h=e.f,p=e.g,g=e.h,y=e.i,x=e.E},e=>{b=e.l,f=e.a},e=>{m=e._}],execute:function(){var t=document.createElement("style");t.textContent=".container[data-v-ea9cd92f]{position:absolute}.content-image[data-v-ea9cd92f]{max-width:100%;max-height:100%;object-fit:contain}\n/*$vite$:1*/",document.head.appendChild(t);const w=["src","alt"];e("default",m({__name:"ImageContainer",props:{id:String,layoutId:String,partner:String,code:String},setup(e){o();const t="https://display24.ru",m=n(null),I=n(!1);let C=null;const $=e,j=a({id:null,displayCode:null,layoutId:null,content:null}),S=l(()=>{var e,t,o,n,a,l,i,r,u;return{top:j.top+"px",left:j.left+"px",width:j.width+"px",height:j.height+"px",backgroundColor:d(null===(e=j.background)||void 0===e?void 0:e.color)||"#000",zIndex:j.zIndex||0,borderColor:(null===(t=j.border)||void 0===t?void 0:t.color)||"#fff",borderStyle:(null===(o=j.border)||void 0===o?void 0:o.style)||"solid",borderWidth:((null===(n=j.border)||void 0===n?void 0:n.width)||0)+"px",borderRadius:(null===(a=j.border)||void 0===a?void 0:a.radius)+"px",boxShadow:`${null===(l=j.shadow)||void 0===l?void 0:l.x}px ${null===(i=j.shadow)||void 0===i?void 0:i.y}px ${null===(r=j.shadow)||void 0===r?void 0:r.b}px ${null===(u=j.shadow)||void 0===u?void 0:u.color}`}}),_=e=>{switch(e){case 1:return{objectFit:"fill",width:"100%",height:"100%"};case 2:return{objectFit:"cover",width:"100%",height:"100%"};default:return{objectFit:"none"}}};return i(async()=>{var e;j.id=$.id,j.displayCode=$.code,j.layoutId=$.layoutId,await b(j,t,"ImageContainer (layouts)"),await f(j,I,t,"ImageContainer (schedule)"),null!==(e=j.content)&&void 0!==e&&e.filename&&(m.value=await(async e=>{const t=`https://cdn.display24.ru/partners/${$.partner}/${e}`;return await x(t)})(j.content.filename)),C=setInterval(()=>{I.value=r(null==j?void 0:j.scheduleData)},1e3)}),u(()=>{C&&clearInterval(C)}),c(()=>j.scheduleData,e=>{I.value=r(e)}),(e,t)=>{var o,n;return s((p(),h("div",{class:"container",style:y(S.value)},[g("",!0),m.value?(p(),h("img",{key:1,src:m.value,alt:null===(o=j.content)||void 0===o?void 0:o.name,class:"content-image",style:y(_(null===(n=j.content)||void 0===n?void 0:n.mediaMode))},null,12,w)):g("",!0)],4)),[[v,I.value]])}}},[["__scopeId","data-v-ea9cd92f"]]))}}});
