import{n as v}from"./vendor-primevue-B6rcS73U.js";import{u as w}from"./vendor-vue-CXt3ZZQ3.js";import{f as _,G as b}from"./widgetPropFilter-CygYoMQt.js";import{bx as x,cM as I,cN as y,r as $,E as s,c as B,d as N,z as P,k as d,e as u,by as i,m as E}from"./vendor-other-CSX7WseZ.js";import{d as S}from"./index-2-qFLlQP.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-BKWXAgVe.js";import"./vendor-tiptap-BkFTmTb3.js";const V={class:"flex flex-col gap-1"},A=["src","alt"],C={class:"h-full w-full p-1"},G=["src","alt"],M=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)=>(N(),B("div",V,[P(i(v),E({"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,A)]),thumbnail:d(({item:e})=>[u("div",C,[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,G)])]),_:1},16,["active-index","value","show-thumbnails","show-item-navigators"])]))}}),q=S(M,[["__scopeId","data-v-34cd3eda"]]);export{q as default};
//# sourceMappingURL=WidgetGalleria-BoWBT6i_.js.map
