import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{G as t}from"./vendor-primevue-DxVRNMbC.js";import{D as n,Dt as r,G as i,I as a,It as o,K as s,O as c,R as l,et as u,gt as d,j as f,ut as p}from"./vendor-vue-core-X6q-rGJs.js";import{n as m}from"./vendor-i18n-B5g6Drzm.js";import{t as h}from"./_plugin-vue_export-helper-fSAtQzP-.js";import{n as g,o as _}from"./widgetPropFilter-AWF4Ovcm.js";var v={class:`flex flex-col gap-1`},y=[`src`,`alt`],b={class:`h-full w-full p-1`},x=[`src`,`alt`],S=h(l({__name:`WidgetGalleria`,props:i({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let i=p(e,`modelValue`),l=e,h=r(0),{t:S}=m(),C=n(()=>_(l.widget.options,g)),w=n(()=>!i.value||!Array.isArray(i.value)?[]:i.value.filter(e=>e!=null).map((e,t)=>typeof e==`string`?{itemImageSrc:e,thumbnailImageSrc:e,alt:`Image ${t}`}:e??{})),T=n(()=>l.widget.options?.showThumbnails!==!1&&w.value.length>1),E=n(()=>l.widget.options?.showItemNavigators!==!1&&w.value.length>1);return(e,n)=>(u(),f(`div`,v,[a(o(t),s({"active-index":h.value,"onUpdate:activeIndex":n[0]||=e=>h.value=e,value:w.value},C.value,{"show-thumbnails":T.value,"show-item-navigators":E.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})=>[c(`img`,{src:e?.itemImageSrc||e?.src||``,alt:e?.alt||`${o(S)(`g.galleryImage`)} ${h.value+1} of ${w.value.length}`,class:`h-auto max-h-64 w-full object-contain`},null,8,y)]),thumbnail:d(({item:e})=>[c(`div`,b,[c(`img`,{src:e?.thumbnailImageSrc||e?.src||``,alt:e?.alt||`${o(S)(`g.galleryThumbnail`)} ${w.value.findIndex(t=>t===e)+1} of ${w.value.length}`,class:`h-full w-full rounded-lg object-cover`},null,8,x)])]),_:1},16,[`active-index`,`value`,`show-thumbnails`,`show-item-navigators`])]))}}),[[`__scopeId`,`data-v-34cd3eda`]]);export{S as default};
//# sourceMappingURL=WidgetGalleria-Yy-scPKs.js.map