import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{U as t}from"./vendor-primevue-DYf-ECwY.js";import{D as n,G as r,I as i,K as a,Lt as o,O as s,Ot as c,R as l,_t as u,et as d,j as f,ut as p}from"./vendor-vue-core-IZuWV8u3.js";import{n as m}from"./vendor-i18n-CpHGo1Sd.js";import{t as h}from"./_plugin-vue_export-helper-D8rLfeal.js";import{n as g,o as _}from"./widgetPropFilter-BCWoOzPM.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:r({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let r=p(e,`modelValue`),l=e,h=c(0),{t:S}=m(),C=n(()=>_(l.widget.options,g)),w=n(()=>!r.value||!Array.isArray(r.value)?[]:r.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)=>(d(),f(`div`,v,[i(o(t),a({"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:u(({item:e})=>[s(`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:u(({item:e})=>[s(`div`,b,[s(`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-Czoz31H-.js.map