import{d,u as f,i as _,s as m,o,a as h,w as v,j as g,c as k,b as l,ac as U,e as y,a6 as B,k as x,a7 as C}from"./index.29cf2edd.js";/* empty css              */const b={key:0},w=x("div",{style:{"margin-top":"8px"}},"Upload",-1),O=d({__name:"MultiUploader",props:{files:{type:Array}},emits:["upload"],setup(n,{emit:r}){const i=n,u={authorization:`Bearer ${f().token}`},s=_([]),p=t=>{if(t.file.status,t.file.status==="done"){const e=s.value;r("upload",e.map(a=>a.response.url))}else t.file.status;console.log(s.value)};return m(()=>i.files,t=>{t&&Object.values(t).map(e=>({name:e.split("/")[5],percent:100,status:"done",thumbUrl:e,uid:e.split("/")[5],url:e}))}),(t,e)=>{const a=C;return o(),h(a,{"file-list":s.value,"onUpdate:file-list":e[0]||(e[0]=c=>s.value=c),name:"file",action:l(B),headers:u,"list-type":"picture-card",onChange:p},{default:v(()=>[s.value.length<20?(o(),g("div",b,[k(l(U)),w])):y("",!0)]),_:1},8,["file-list","action"])}}});export{O as _};
