import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{Cr as n,Mr as r,Nn as i,Nt as a,Pt as o,Rr as s,Xn as c,Xr as l,Zn as u,ai as d,ar as f,er as p,hr as m,mr as h,sr as g}from"./vendor-primevue-D50rA9nL.js";import{ot as _,st as v}from"./vendor-other-BnH5nyVX.js";import{n as y,t as b}from"./_plugin-vue_export-helper-Ckv1EJQX.js";import{n as x,o as S,s as C}from"./widgetPropFilter-Bp2uptBz.js";var w,T,E,D,O,k=t((()=>{i(),a(),_(),C(),w={class:`flex flex-col gap-1`},T=[`src`,`alt`],E={class:`h-full w-full p-1`},D=[`src`,`alt`],O=g({__name:`WidgetGalleria`,props:h({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=r(e,`modelValue`),i=e,a=l(0),{t:h}=v(),g=c(()=>S(i.widget.options,x)),_=c(()=>!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=c(()=>i.widget.options?.showThumbnails!==!1&&_.value.length>1),b=c(()=>i.widget.options?.showItemNavigators!==!1&&_.value.length>1);return(e,t)=>(n(),p(`div`,w,[f(d(o),m({"active-index":a.value,"onUpdate:activeIndex":t[0]||=e=>a.value=e,value:_.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:s(({item:e})=>[u(`img`,{src:e?.itemImageSrc||e?.src||``,alt:e?.alt||`${d(h)(`g.galleryImage`)} ${a.value+1} of ${_.value.length}`,class:`h-auto max-h-64 w-full object-contain`},null,8,T)]),thumbnail:s(({item:e})=>[u(`div`,E,[u(`img`,{src:e?.thumbnailImageSrc||e?.src||``,alt:e?.alt||`${d(h)(`g.galleryThumbnail`)} ${_.value.findIndex(t=>t===e)+1} of ${_.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-CAuG7I75.js.map