var g=Object.defineProperty;var c=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var u=(o,e,n)=>e in o?g(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,p=(o,e)=>{for(var n in e||(e={}))h.call(e,n)&&u(o,n,e[n]);if(c)for(var n of c(e))w.call(e,n)&&u(o,n,e[n]);return o};import{a as I,l as x,e as C,r as b,m as L,M as V,K as k,u as _,R as y,U as v,as as B}from"./vue-chunks-l-AyUCfi.js";import{p as a,B as M}from"./index-OziN21LA.js";import{ac as z}from"./element-plus-C2aeItNs.js";function $(){const e=I().appContext.config.globalProperties;return{showLoading:(i={text:"上传中..."})=>{e.$loading(i)},hideLoading:()=>{e.$loading().close()}}}const O=x({__name:"ImageViewer",props:{urlList:{type:Array,default:()=>[]},zIndex:a.number.def(200),initialIndex:a.number.def(0),infinite:a.bool.def(!0),hideOnClickModal:a.bool.def(!1),teleported:a.bool.def(!1),show:a.bool.def(!1)},setup(o){const e=o,n=C(()=>{const r=p({},e);return delete r.show,r}),s=b(e.show),i=()=>{s.value=!1};return(r,l)=>s.value?(L(),V(_(z),k({key:0},n.value,{onClose:i}),null,16)):y("",!0)}});let f=null;function A(o){if(!M)return;const{urlList:e,initialIndex:n=0,infinite:s=!0,hideOnClickModal:i=!1,teleported:r=!1,zIndex:l=9999,show:m=!0}=o,t={},d=document.createElement("div");t.urlList=e,t.initialIndex=n,t.infinite=s,t.hideOnClickModal=i,t.teleported=r,t.zIndex=l,t.show=m,document.body.appendChild(d),f=v(O,t),B(f,d)}export{A as c,$ as u};
