import{n as v}from"./vendor-primevue-CyfaM-iT.js";import{u as w}from"./vendor-vue-D63Y1BGo.js";import{f as _,G as b}from"./widgetPropFilter-CygYoMQt.js";import{bq as x,cF as I,cG as y,r as $,E as s,c as B,d as P,z as E,k as d,e as u,br as i,m as G}from"./vendor-other-Cmk2i5tl.js";import{d as N}from"./index-ClJ8cazm.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-ClVfPtHN.js";import"./vendor-tiptap-B-QhEHeV.js";const S={class:"flex flex-col gap-1"},V=["src","alt"],A={class:"h-full w-full p-1"},C=["src","alt"],k=x({__name:"WidgetGalleria",props:I({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const o=y(c,"modelValue"),r=c,n=$(0),{t:m}=w(),f=s(()=>_(r.widget.options,b)),t=s(()=>!o.value||!Array.isArray(o.value)?[]:o.value.filter(a=>a!=null).map((a,l)=>typeof a=="string"?{itemImageSrc:a,thumbnailImageSrc:a,alt:`Image ${l}`}:a??{})),g=s(()=>r.widget.options?.showThumbnails!==!1&&t.value.length>1),h=s(()=>r.widget.options?.showItemNavigators!==!1&&t.value.length>1);return(a,l)=>(P(),B("div",S,[E(i(v),G({"active-index":n.value,"onUpdate:activeIndex":l[0]||(l[0]=e=>n.value=e),value:t.value},f.value,{"show-thumbnails":g.value,"show-item-navigators":h.value,class:"max-w-full",pt:{thumbnails:{class:"overflow-hidden"},thumbnailContent:{class:"py-4 px-2"},thumbnailPrevButton:{class:"m-0"},thumbnailNextButton:{class:"m-0"}}}),{item:d(({item:e})=>[u("img",{src:e?.itemImageSrc||e?.src||"",alt:e?.alt||`${i(m)("g.galleryImage")} ${n.value+1} of ${t.value.length}`,class:"h-auto max-h-64 w-full object-contain"},null,8,V)]),thumbnail:d(({item:e})=>[u("div",A,[u("img",{src:e?.thumbnailImageSrc||e?.src||"",alt:e?.alt||`${i(m)("g.galleryThumbnail")} ${t.value.findIndex(p=>p===e)+1} of ${t.value.length}`,class:"h-full w-full rounded-lg object-cover"},null,8,C)])]),_:1},16,["active-index","value","show-thumbnails","show-item-navigators"])]))}}),U=N(k,[["__scopeId","data-v-34cd3eda"]]);export{U as default};
//# sourceMappingURL=WidgetGalleria-CM8cn2tO.js.map
