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