import{r,o as i,y as C,q as d,c as p,F as b,A as B,n as o,v as u,p as f,P as $,x as P,s as g,bM as _,d1 as S,l as E,bv as U,d2 as q}from"./index.8d733f79.js";const A=["onClick"],N=["src"],F=["src"],M={__name:"snapshotDrawer",setup(L,{expose:v}){const c="./",s=r(!1),l=r([]),n=r(!1),m=r("");function w(){s.value=!0,l.value=_().atlasCheckData}function h(e){S({fileId:l.value[e].imageId}).then(a=>{a.code===200&&(l.value.splice(e,1),_().resetAtlasCheckData(l.value))})}function I(e){n.value=!0,m.value=`${c}/equipment-web/file/downloadImage?fileId=${e.imageId}`}return v({showDrawer:w}),(e,a)=>{const k=E,y=U,V=q;return i(),C(V,{modelValue:o(s),"onUpdate:modelValue":a[1]||(a[1]=t=>g(s)?s.value=t:null),title:e.$t("chartSnapshot"),direction:"rtl",size:"500px"},{default:d(()=>[(i(!0),p(b,null,B(o(l),(t,x)=>(i(),p("div",{key:t.imageId,style:{display:"flex","margin-bottom":"8px"}},[u("div",{style:{flex:"1",cursor:"pointer"},onClick:D=>I(t)},[u("img",{src:o(c)+"/equipment-web/file/downloadImage?fileId="+t.imageId,style:{width:"400px"}},null,8,N)],8,A),f(k,{link:"",type:"danger",style:{width:"80px",margin:"auto"},onClick:D=>h(x)},{default:d(()=>[$(P(e.$t("delete")),1)]),_:2},1032,["onClick"])]))),128)),f(y,{modelValue:o(n),"onUpdate:modelValue":a[0]||(a[0]=t=>g(n)?n.value=t:null)},{default:d(()=>[u("img",{class:"img-pre",src:o(m),alt:"Preview Image"},null,8,F)]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])}}};export{M as default};
