import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{Lr as n,Nn as r,Nt as i,Pt as a,Sr as o,Xn as s,Yr as c,Zn as l,er as u,ii as d,ir as f,jr as p,mr as m,or as h,pr as g}from"./vendor-primevue-D1-E3-0M.js";import{at as _,it as v}from"./vendor-other-CT05lTmi.js";import{n as y,t as b}from"./_plugin-vue_export-helper-DrrwuIjt.js";import{n as x,o as S,s as C}from"./widgetPropFilter-XgiARzPo.js";var w,T,E,D,O,k=t((()=>{r(),i(),v(),C(),w={class:`flex flex-col gap-1`},T=[`src`,`alt`],E={class:`h-full w-full p-1`},D=[`src`,`alt`],O=h({__name:`WidgetGalleria`,props:g({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=p(e,`modelValue`),r=e,i=c(0),{t:h}=_(),g=s(()=>S(r.widget.options,x)),v=s(()=>!t.value||!Array.isArray(t.value)?[]:t.value.filter(e=>e!=null).map((e,t)=>typeof e==`string`?{itemImageSrc:e,thumbnailImageSrc:e,alt:`Image ${t}`}:e??{})),y=s(()=>r.widget.options?.showThumbnails!==!1&&v.value.length>1),b=s(()=>r.widget.options?.showItemNavigators!==!1&&v.value.length>1);return(e,t)=>(o(),u(`div`,w,[f(d(a),m({"active-index":i.value,"onUpdate:activeIndex":t[0]||=e=>i.value=e,value:v.value},g.value,{"show-thumbnails":y.value,"show-item-navigators":b.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:n(({item:e})=>[l(`img`,{src:e?.itemImageSrc||e?.src||``,alt:e?.alt||`${d(h)(`g.galleryImage`)} ${i.value+1} of ${v.value.length}`,class:`h-auto max-h-64 w-full object-contain`},null,8,T)]),thumbnail:n(({item:e})=>[l(`div`,E,[l(`img`,{src:e?.thumbnailImageSrc||e?.src||``,alt:e?.alt||`${d(h)(`g.galleryThumbnail`)} ${v.value.findIndex(t=>t===e)+1} of ${v.value.length}`,class:`h-full w-full rounded-lg object-cover`},null,8,D)])]),_:1},16,[`active-index`,`value`,`show-thumbnails`,`show-item-navigators`])]))}})})),A=t((()=>{})),j;t((()=>{k(),k(),A(),y(),j=b(O,[[`__scopeId`,`data-v-34cd3eda`]])}))();export{j as default};
//# sourceMappingURL=WidgetGalleria-C_DSbRm7.js.map