import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{G as t}from"./vendor-primevue-7po8Zk9v.js";import{$ as n,A as r,D as i,E as a,Et as o,F as s,Ft as c,G as l,L as u,W as d,ht as f,lt as p}from"./vendor-vue-core-D3IvUUeM.js";import{n as m}from"./vendor-i18n-CsAN_zFP.js";import{t as h}from"./_plugin-vue_export-helper-CTPoQIH5.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(u({__name:`WidgetGalleria`,props:d({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let u=p(e,`modelValue`),d=e,h=o(0),{t:S}=m(),C=a(()=>_(d.widget.options,g)),w=a(()=>!u.value||!Array.isArray(u.value)?[]:u.value.filter(e=>e!=null).map((e,t)=>typeof e==`string`?{itemImageSrc:e,thumbnailImageSrc:e,alt:`Image ${t}`}:e??{})),T=a(()=>d.widget.options?.showThumbnails!==!1&&w.value.length>1),E=a(()=>d.widget.options?.showItemNavigators!==!1&&w.value.length>1);return(e,a)=>(n(),r(`div`,v,[s(c(t),l({"active-index":h.value,"onUpdate:activeIndex":a[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:f(({item:e})=>[i(`img`,{src:e?.itemImageSrc||e?.src||``,alt:e?.alt||`${c(S)(`g.galleryImage`)} ${h.value+1} of ${w.value.length}`,class:`h-auto max-h-64 w-full object-contain`},null,8,y)]),thumbnail:f(({item:e})=>[i(`div`,b,[i(`img`,{src:e?.thumbnailImageSrc||e?.src||``,alt:e?.alt||`${c(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-7sY-KvoO.js.map