import{c,A as g,d as h,u as v,i as O,o as b,a as U,w as u,b as d,f as y,t as S,a6 as x,B,a7 as P}from"./index.29cf2edd.js";/* empty css              */var V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},w=V;function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){j(e,a,n[a])})}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(t,n){var r=f({},t,n.attrs);return c(g,f({},r,{icon:w}),null)};p.displayName="UploadOutlined";p.inheritAttrs=!1;var L=p;const C=h({__name:"SingleUploader",props:{text:{type:String,required:!0}},emits:["upload"],setup(e,{emit:t}){const r={authorization:`Bearer ${v().token}`},a=O([]),m=l=>{if(l.file.status,l.file.status==="done"){const o=a.value;o.length>0&&o.forEach(s=>{const i=s.response;t("upload",i.url)})}else l.file.status};return(l,o)=>{const s=B,i=P;return b(),U(i,{fileList:a.value,"onUpdate:fileList":o[0]||(o[0]=_=>a.value=_),name:"file",action:d(x),headers:r,"list-type":"picture",onChange:m},{default:u(()=>[c(s,null,{icon:u(()=>[c(d(L))]),default:u(()=>[y(" "+S(e.text),1)]),_:1})]),_:1},8,["fileList","action"])}}});export{C as _};
