import{defineComponent as v,mergeModels as w,useModel as _,ref as x,computed as i,openBlock as b,createElementBlock as I,createVNode as y,unref as p,mergeProps as $,withCtx as c,createElementVNode as s}from"vue";import P from"primevue/galleria";import{useI18n as B}from"vue-i18n";import{f as E,G}from"./widgetPropFilter-CygYoMQt.js";import{d as N}from"./index-CU6LcO2W.js";import"@primevue/themes";import"@primevue/themes/aura";import"./vendor-other-BpgYsL4Z.js";import"./vendor-vue-C7sAPp8E.js";import"primevue/config";import"primevue/confirmationservice";import"primevue/toastservice";import"primevue/tooltip";import"primevue/button";import"primevue/message";import"primevue/skeleton";import"primevue/multiselect";import"primevue/inputtext";import"primevue/select";import"primevue/checkbox";import"primevue/divider";import"primevue/scrollpanel";import"primevue/usetoast";import"primevue/card";import"primevue/listbox";import"primevue/progressbar";import"primevue/floatlabel";import"@primevue/forms";import"@primevue/forms/resolvers/zod";import"primevue/password";import"primevue/progressspinner";import"primevue/tag";import"primevue/inputnumber";import"primevue/tabpanels";import"primevue/tabs";import"primevue/iconfield";import"primevue/inputicon";import"primevue/badge";import"primevue/chip";import"primevue/tabpanel";import"primevue/toggleswitch";import"primevue/colorpicker";import"primevue/radiobutton";import"primevue/knob";import"primevue/slider";import"primevue/panel";import"primevue/tabmenu";import"primevue/popover";import"primevue/tab";import"primevue/tablist";import"primevue";import"primevue/autocomplete";import"primevue/dropdown";import"./vendor-xterm-DV1MVhAx.js";import"./vendor-three-zdhtZbSm.js";import"primevue/contextmenu";import"primevue/tree";import"primevue/toolbar";import"primevue/selectbutton";import"primevue/dialog";import"primevue/confirmpopup";import"primevue/useconfirm";import"primevue/confirmdialog";import"./vendor-tiptap-mfowjb53.js";import"primevue/blockui";const S={class:"flex flex-col gap-1"},V=["src","alt"],A={class:"h-full w-full p-1"},C=["src","alt"],L=v({__name:"WidgetGalleria",props:w({widget:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const m=_(n,"modelValue"),l=n,a=x(0),{t:u}=B(),d=i(()=>E(l.widget.options,G)),r=i(()=>!m.value||!Array.isArray(m.value)?[]:m.value.filter(o=>o!=null).map((o,e)=>typeof o=="string"?{itemImageSrc:o,thumbnailImageSrc:o,alt:`Image ${e}`}:o??{})),f=i(()=>l.widget.options?.showThumbnails!==!1&&r.value.length>1),g=i(()=>l.widget.options?.showItemNavigators!==!1&&r.value.length>1);return(o,e)=>(b(),I("div",S,[y(p(P),$({"active-index":a.value,"onUpdate:activeIndex":e[0]||(e[0]=t=>a.value=t),value:r.value},d.value,{"show-thumbnails":f.value,"show-item-navigators":g.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:t})=>[s("img",{src:t?.itemImageSrc||t?.src||"",alt:t?.alt||`${p(u)("g.galleryImage")} ${a.value+1} of ${r.value.length}`,class:"h-auto max-h-64 w-full object-contain"},null,8,V)]),thumbnail:c(({item:t})=>[s("div",A,[s("img",{src:t?.thumbnailImageSrc||t?.src||"",alt:t?.alt||`${p(u)("g.galleryThumbnail")} ${r.value.findIndex(h=>h===t)+1} of ${r.value.length}`,class:"h-full w-full rounded-lg object-cover"},null,8,C)])]),_:1},16,["active-index","value","show-thumbnails","show-item-navigators"])]))}}),zt=N(L,[["__scopeId","data-v-34cd3eda"]]);export{zt as default};
//# sourceMappingURL=WidgetGalleria-BNzEm-00.js.map
