import{_ as k,i as v,G as C,ap as F,aq as W,a9 as s,r,o,a as m,w as l,l as _,p as t,n as f,b as p,F as w,h as y,v as L,q as M}from"./main-DtyiNRRn.js";import{c as u}from"./containerPaddings-D8eaMhv2.js";const x={name:"ImageFi",components:{ComponentWrapper:v,GridContainerFi:C,SsrCloudImageFi:F},mixins:[W],props:{fields:{type:Object,default:()=>({})}},computed:{href(){var i,e,a;return(a=(e=(i=this.fields)==null?void 0:i.imageLink)==null?void 0:e.value)==null?void 0:a.href},unlimited(){return s.lg-2*u.lg},breakpoints(){return Object.keys(s).map(e=>({mediaWidth:s[e],imageWidth:s[e]-2*u[e]})).sort((e,a)=>e.mediaWidth>a.mediaWidth)},caption(){var i,e;return(e=(i=this.fields)==null?void 0:i.imageCaption)==null?void 0:e.value}}},B={class:"fi-col-start-1 md:fi-col-start-2 fi-col-end-13 md:fi-col-end-12"},H=["innerHTML"],I={class:"image-fi__caption"},T=["innerHTML"],N={key:2,class:"image-fi__caption"};function V(i,e,a,j,q,n){const g=r("ssr-cloud-image-fi"),h=r("grid-container-fi"),b=r("component-wrapper");return o(),m(b,null,{default:l(()=>[_(h,null,{default:l(()=>{var c,d;return[t("div",B,[t("div",{class:f({"image-fi":!0,"image-fi--with-caption":n.caption})},[i.isEditMode?(o(),p(w,{key:0},[t("div",{class:"image-fi__editable-image",innerHTML:(c=a.fields.image)==null?void 0:c.editable},null,8,H),t("div",I,[e[0]||(e[0]=t("span",{class:"fi-mr-6"},"Caption:",-1)),t("span",{innerHTML:(d=a.fields.imageCaption)==null?void 0:d.editable},null,8,T)])],64)):(o(),m(y(n.href?"a":"span"),{key:1,href:n.href,class:f(n.href?"image-fi__link":null)},{default:l(()=>[_(g,{field:a.fields.image,breakpoints:n.breakpoints,unlimited:n.unlimited,class:"image-fi__img"},null,8,["field","breakpoints","unlimited"])]),_:1},8,["href","class"])),n.caption?(o(),p("div",N,L(n.caption),1)):M("",!0)],2)])]}),_:1})]),_:1})}const G=k(x,[["render",V],["__scopeId","data-v-b0ab6970"]]);export{G as default};