import{d as v,r as u,c as _,e as r,f as a,F as h,H as k,h as w,w as C,j as I,k as M,n as i,S as x}from"./index-a0da86f0.js";import{_ as F}from"./_plugin-vue_export-helper-c27b6911.js";const b={key:0,class:"media-section"},N={class:"image-grid"},y=["onClick"],B=["src","alt"],S={class:"image-modal-container"},V=["src"],L=v({__name:"ImageSection",props:{metaFields:{},record:{},pageMeta:{}},setup(f){const n=f,o=u(!1),d=u(""),c=_(()=>{var l;const t=(l=n.pageMeta)==null?void 0:l.image_field;if(!t||!t.trim())return[];const s=n.metaFields.find(m=>m.fieldname===t);if(!s)return[];const e=n.record[t];return!e||!e.trim()?[]:[{fieldname:t,url:e,label:s.label||t}]}),p=_(()=>c.value.length>0),g=t=>{d.value=t,o.value=!0};return(t,s)=>p.value?(i(),r("div",b,[a("div",N,[(i(!0),r(h,null,k(c.value,(e,l)=>(i(),r("div",{key:l,class:"image-card",onClick:m=>g(e.url)},[a("img",{src:e.url,alt:e.fieldname},null,8,B)],8,y))),128))]),w(I(x),{show:o.value,"onUpdate:show":s[1]||(s[1]=e=>o.value=e),"mask-closable":!0},{default:C(()=>[a("div",S,[a("button",{class:"close-btn",onClick:s[0]||(s[0]=e=>o.value=!1)},[...s[2]||(s[2]=[a("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none"},[a("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])]),a("img",{src:d.value,class:"preview-image"},null,8,V)])]),_:1},8,["show"])])):M("",!0)}});const j=F(L,[["__scopeId","data-v-626f5180"]]);export{j as default};
